diff --git a/build.gradle.kts b/build.gradle.kts index bdaec40e..40232c6a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -43,6 +43,7 @@ plugins { kotlin("jvm") apply false `maven-publish` signing + id("io.codearte.nexus-staging") kotlin("plugin.spring") apply false id("org.springframework.boot") apply false id("io.spring.dependency-management") apply false @@ -55,6 +56,12 @@ plugins { id("jacoco") } +nexusStaging { + serverUrl = "$sonaTypeBasePath/service/local/" + username = sonaTypeMavenUser + password = sonaTypeMavenPassword +} + jgitver { strategy = fr.brouillard.oss.jgitver.Strategies.PATTERN versionPattern = diff --git a/gradle.properties b/gradle.properties index 80031da4..66c64ae7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,6 +14,7 @@ palantirGitVersion=0.12.2 jacocoToolVersion=0.8.7 jGitVerVersion=0.9.1 dokkaVersion=1.6.21 +nexusStagingVersion=0.30.0 # Core infrastructure libs versions kotlinVersion=1.6.21 diff --git a/settings.gradle.kts b/settings.gradle.kts index 2bc7ff45..fb92f7a7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,6 +9,7 @@ pluginManagement { val jGitVerVersion: String by settings val protobufPluginVersion: String by settings val dokkaVersion: String by settings + val nexusStagingVersion: String by settings plugins { kotlin("jvm") version kotlinVersion apply false @@ -24,6 +25,7 @@ pluginManagement { id("fr.brouillard.oss.gradle.jgitver") version jGitVerVersion id("com.google.protobuf") version protobufPluginVersion apply false id("org.jetbrains.dokka") version dokkaVersion + id("io.codearte.nexus-staging") version nexusStagingVersion } repositories { diff --git a/we-node-client-grpc/we-node-client-grpc-java/build.gradle.kts b/we-node-client-grpc/we-node-client-grpc-java/build.gradle.kts index e8df2e60..6d8bd228 100644 --- a/we-node-client-grpc/we-node-client-grpc-java/build.gradle.kts +++ b/we-node-client-grpc/we-node-client-grpc-java/build.gradle.kts @@ -8,6 +8,7 @@ import com.google.protobuf.gradle.protoc val protobufVersion: String by project val ioGrpcVersion: String by project val ioGrpcKotlinVersion: String by project +val osxArch: String? by project plugins { id("com.google.protobuf") @@ -34,13 +35,15 @@ val grpcJavaPlugin = "grpc" protobuf { generatedFilesBaseDir = "$buildDir/generated-sources" + val archPostFix = if (osxArch == "m1") ":osx-x86_64" else "" + protoc { - artifact = "com.google.protobuf:protoc:$protobufVersion" + artifact = "com.google.protobuf:protoc:$protobufVersion$archPostFix" } plugins { id(grpcJavaPlugin) { - artifact = "io.grpc:protoc-gen-grpc-java:$ioGrpcVersion" + artifact = "io.grpc:protoc-gen-grpc-java:$ioGrpcVersion$archPostFix" } }