Skip to content

Supply protoc plugin via JAR #586

Merged
dmdashenkov merged 25 commits intomasterfrom
use-proto-plugin-jar-support
Nov 12, 2020
Merged

Supply protoc plugin via JAR #586
dmdashenkov merged 25 commits intomasterfrom
use-proto-plugin-jar-support

Conversation

@dmdashenkov
Copy link
Contributor

@dmdashenkov dmdashenkov commented Nov 6, 2020

The latest version of Protobuf Gradle plugin allows using a runnable JAR as a protoc plugin instead of an executable file. This means less work for us.

This PR also updates third-party dependencies, including ErrorProne. New ErrorProne warnings are addressed.

@dmdashenkov dmdashenkov self-assigned this Nov 6, 2020
# Conflicts:
#	base/build.gradle.kts
#	base/src/main/java/io/spine/code/proto/ScalarType.java
#	base/src/test/java/io/spine/base/IdentifierTest.java
#	base/src/test/java/io/spine/reflect/given/ConstructorsTestEnv.java
#	license-report.md
#	pom.xml
#	tools/model-compiler/build.gradle.kts
#	tools/model-compiler/src/test/java/io/spine/tools/gradle/compiler/given/ModelCompilerTestEnv.java
#	tools/mute-logging/src/test/java/io/spine/testing/logging/MuteLoggingExtensionTest.java
#	tools/plugin-base/build.gradle.kts
#	tools/proto-js-plugin/src/main/java/io/spine/js/generate/field/parser/primitive/PrimitiveParsers.java
#	tools/proto-js-plugin/src/test/java/io/spine/js/generate/given/GivenProject.java
#	tools/proto-js-plugin/src/test/java/io/spine/js/gradle/ProtoJsPluginTest.java
#	tools/protoc-plugin/src/test/java/io/spine/tools/protoc/ClassMemberTest.java
#	tools/protoc-plugin/src/test/java/io/spine/tools/protoc/ExternalClassLoaderTest.java
#	tools/validation-generator/src/main/java/io/spine/tools/validate/AccumulateViolations.java
#	version.gradle.kts
@dmdashenkov dmdashenkov linked an issue Nov 9, 2020 that may be closed by this pull request
@dmdashenkov dmdashenkov linked an issue Nov 9, 2020 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Nov 9, 2020

Codecov Report

Merging #586 (41c32d6) into master (f79331f) will increase coverage by 0.21%.
The diff coverage is 31.25%.

@@             Coverage Diff              @@
##             master     #586      +/-   ##
============================================
+ Coverage     77.50%   77.72%   +0.21%     
+ Complexity     3035     3034       -1     
============================================
  Files           508      508              
  Lines         11567    11533      -34     
  Branches        671      670       -1     
============================================
- Hits           8965     8964       -1     
+ Misses         2374     2341      -33     
  Partials        228      228              

@dmdashenkov
Copy link
Contributor Author

@alexander-yevsyukov, @armiol, PTAL.

Copy link
Contributor

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with one minor question.

@@ -37,9 +37,11 @@
@SuppressWarnings("BadImport") // refer to `FieldDescriptor.Type` as `Type` in this class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this suppression, assuming we have them in-place below?

Copy link
Collaborator

@armiol armiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmdashenkov LGTM in general. Please see my comments though.

/**
* A factory of Groovy strings.
*
* @deprecated Since the latest changes in the Protobuf Gradle plugin, usage Groovy strings in Java
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's of Groovy.

else -> zipTree(it)
}
})
// We should provide a classifier or else Protobuf Gradle plugin will substitute an OS-specific
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to bother you again on the same matter, but I think it's will substitute it with an OS-specific one.

@dmdashenkov dmdashenkov merged commit 6c9c614 into master Nov 12, 2020
@dmdashenkov dmdashenkov deleted the use-proto-plugin-jar-support branch November 12, 2020 11:55
This was referenced Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Protoc plugin JAR self-executable

3 participants