Skip to content

Commit

Permalink
Move options to generator module
Browse files Browse the repository at this point in the history
I think it's strange to have an extra maven artifact for options, so I've put them into the generator module with "options" classifier
  • Loading branch information
Duzhinsky committed Sep 13, 2023
1 parent 96dc1f8 commit f743d0b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 77 deletions.
18 changes: 16 additions & 2 deletions generator/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id("com.google.protobuf") version "0.9.1"
`maven-publish`
signing
id("com.github.johnrengelman.shadow") version "8.1.1"
Expand All @@ -9,8 +10,13 @@ java {
withSourcesJar()
}

val optionsJar = tasks.create<Jar>("optionsJar") {
archiveClassifier = "options"
from(sourceSets.main.get().proto)
}

signing {
sign(publishing.publications)
// sign(publishing.publications)
}

publishing {
Expand Down Expand Up @@ -56,6 +62,9 @@ publishing {
artifact(tasks.shadowJar) {
classifier = "jvm"
}
artifact(optionsJar) {
classifier = "options"
}
}
}
}
Expand All @@ -66,11 +75,16 @@ tasks.shadowJar {
}

dependencies {
implementation(project(":options"))
implementation(project(":javapoet"))
implementation("com.google.protobuf:protobuf-java:3.21.9")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2")

implementation("org.apache.commons:commons-lang3:3.13.0")
implementation("commons-io:commons-io:2.13.0")
}

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.21.9"
}
}
72 changes: 0 additions & 72 deletions options/build.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
rootProject.name = "protogen"

include(
"options",
"javapoet",
"generator",
"tests"
Expand Down
3 changes: 1 addition & 2 deletions tests/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.protobuf

plugins {
java
Expand Down Expand Up @@ -34,12 +33,12 @@ protobuf {
}

dependencies {
protobuf(project(":generator"))
implementation("io.grpc:grpc-protobuf:1.51.0")
implementation("io.grpc:grpc-stub:1.51.0")
implementation("io.grpc:grpc-services:1.51.0")
implementation("javax.annotation:javax.annotation-api:1.3.2")

implementation("com.google.protobuf:protobuf-java:3.21.9")
protobuf(project(":options"))
testImplementation("org.assertj:assertj-core:3.24.2")
}

0 comments on commit f743d0b

Please sign in to comment.