-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4918625
commit ed60fa0
Showing
5 changed files
with
109 additions
and
93 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import com.google.protobuf.gradle.* | ||
|
||
plugins { | ||
`java-library` | ||
`maven-publish` | ||
|
||
// gRPC | ||
id("com.google.protobuf") version "0.8.18" | ||
} | ||
|
||
group = "dev.emortal.api.agonessdk" | ||
version = "1.0-SNAPSHOT" | ||
|
||
val grpcVersion = "1.50.2" | ||
val protobufVersion = "3.21.7" | ||
val protocVersion = protobufVersion | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// gRPC | ||
api("io.grpc:grpc-protobuf:$grpcVersion") | ||
api("io.grpc:grpc-stub:$grpcVersion") | ||
api("io.grpc:grpc-netty:$grpcVersion") | ||
|
||
api("javax.annotation:javax.annotation-api:1.3.2") | ||
implementation("org.slf4j:slf4j-api:2.0.3") | ||
|
||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0") | ||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.0") | ||
} | ||
|
||
protobuf { | ||
protoc { | ||
artifact = "com.google.protobuf:protoc:$protocVersion" | ||
} | ||
plugins { | ||
id("grpc") { | ||
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion" | ||
} | ||
} | ||
generateProtoTasks { | ||
all().forEach { | ||
it.plugins { | ||
id("grpc") {} | ||
} | ||
} | ||
} | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(20)) | ||
} | ||
} | ||
|
||
tasks { | ||
test { | ||
useJUnitPlatform() | ||
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = "development" | ||
url = uri("https://repo.emortal.dev/snapshots") | ||
credentials { | ||
username = System.getenv("MAVEN_USERNAME") | ||
password = System.getenv("MAVEN_SECRET") | ||
} | ||
} | ||
maven { | ||
name = "release" | ||
url = uri("https://repo.emortal.dev/releases") | ||
credentials { | ||
username = System.getenv("MAVEN_USERNAME") | ||
password = System.getenv("MAVEN_SECRET") | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
create<MavenPublication>("maven") { | ||
groupId = "dev.emortal.api" | ||
artifactId = "agones-sdk" | ||
|
||
val commitHash = System.getenv("COMMIT_HASH_SHORT") | ||
val releaseVersion = System.getenv("RELEASE_VERSION") | ||
version = commitHash ?: releaseVersion ?: "local" | ||
|
||
from(components["java"]) | ||
} | ||
} | ||
} | ||
|
||
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code. | ||
sourceSets { | ||
main { | ||
java { | ||
srcDirs("build/generated/source/proto/main/grpc") | ||
srcDirs("build/generated/source/proto/main/java") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rootProject.name = "agones-java-grpc-sdk" |