diff options
author | James Simon <jamsimox@amazon.com> | 2023-03-03 22:05:33 -0500 |
---|---|---|
committer | James Simon <jamsimox@amazon.com> | 2023-03-03 22:08:59 -0500 |
commit | 26336202707648cc5532fb284adc7f4b765b777e (patch) | |
tree | 30a5291fabb347f2e207c60c7cafe7273fe42672 /build.gradle | |
parent | ba21e16b599cdb988bb5d3bf84a8dbd0269e79ff (diff) |
Initial Project Commit
Signed-off-by: James Simon <jamsimox@amazon.com>
Change-Id: If56235df0d18cbe43c4c017d5728b1ae1cb79358
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..ddf0e9e --- /dev/null +++ b/build.gradle @@ -0,0 +1,71 @@ +plugins { + id "com.google.protobuf" version "0.9.2" + id "java" + //id "net.idlestate.gradle-duplicate-classes-check" version "1.2.0" +} + +group 'com.gitlab.techschool' +version '1.0-SNAPSHOT' + +sourceCompatibility = 1.8 + +repositories { + mavenCentral() +} + +dependencies { + testImplementation group: 'junit', name: 'junit', version: '4.13.2' + + // https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java + implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.22.0' + //implementation group: 'io.grpc', name: 'grpc-all', version: '1.53.0' + tasks.named("processResources").configure { dependsOn("generateProto") } + + +} +sourceSets { + main { + proto { + srcDir 'src/main/proto/messages' + include '**/*.proto' + } + java { + srcDirs 'src/main/java' + } + } +} +protobuf { + generatedFilesBaseDir = "src/main" + // deleteGeneratedFilesBeforeCompile = true + + + protoc { + artifact = 'com.google.protobuf:protoc:3.22.0' + } + plugins { + grpc { + artifact = 'io.grpc:protoc-gen-grpc-java:1.53.0' + } + doc { + artifact = "io.github.pseudomuto:protoc-gen-doc:1.5.1" + } + } + generateProtoTasks { + processResources() { + duplicatesStrategy = 'EXCLUDE' +} + all().each { task -> + task.builtins { + java {} + cpp {} + } + task.plugins{ + // grpc {} + doc { + //option 'html, index.html' + option 'markdown, v2c.md' + } + } + } + } + }
\ No newline at end of file |