aboutsummaryrefslogtreecommitdiffstats
path: root/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle69
1 files changed, 37 insertions, 32 deletions
diff --git a/build.gradle b/build.gradle
index 3acc20c..3626aed 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,42 +1,47 @@
plugins {
id "com.google.protobuf" version "0.9.2"
id "java"
- //id "net.idlestate.gradle-duplicate-classes-check" version "1.2.0"
+ id "net.idlestate.gradle-duplicate-classes-check" version "1.2.0"
}
group 'com.gitlab.techschool'
version '1.0-SNAPSHOT'
-sourceCompatibility = 1.8
+java {
+ toolchain {
+ languageVersion = JavaLanguageVersion.of(11)
+ }
+}
+
+
+
+
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") }
-
+ testImplementation group: 'junit', name: 'junit', version: '4.13.2'
+ implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.22.0'
+ // implementation group: 'io.grpc', name: 'grpc-all', version: '1.53.0'
}
+
sourceSets {
main {
- proto {
+ proto {
srcDir 'src/main/proto/messages'
include '**/*.proto'
}
java {
- srcDirs 'main/java'
+ srcDirs 'src/main/java' // Changed 'main/java' to 'src/main/java'
}
}
}
+
protobuf {
- generatedFilesBaseDir = "src/"
- // deleteGeneratedFilesBeforeCompile = true
+ // generatedFilesBaseDir = "src/"
protoc {
@@ -46,29 +51,29 @@ protobuf {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.53.0'
}
- doc {
+ 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'
+ all().each { task ->
+
+
+ task.builtins {
+ java {
+ outputSubDir = 'src/main/java'
}
+ cpp {}
}
- }
- }
- }
-
+ task.plugins {
+ doc {
+ option 'html, v2c.html'
+ }
+ }
+ }
- \ No newline at end of file
+ processResources {
+ duplicatesStrategy = 'EXCLUDE'
+ }
+ }
+}