Skip to content

Commit 2fe43c5

Browse files
committed
build: simplify Gradle project configuration and CI publishing
1 parent c4714a4 commit 2fe43c5

5 files changed

Lines changed: 9 additions & 31 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
./gradlew :bedrock-codec:publishToMavenCentral
6767
./gradlew :bedrock-connection:publishToMavenCentral
6868
env:
69-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
70-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
71-
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SONATYPE_SECRET_KEY }}
72-
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SONATYPE_SECRET_KEY_PASSWORD }}
69+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME || secrets.OSSRH_USERNAME }}
70+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD || secrets.OSSRH_PASSWORD }}
71+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SONATYPE_SECRET_KEY || secrets.MAVEN_CENTRAL_SECRET }}
72+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SONATYPE_SECRET_KEY_PASSWORD || secrets.MAVEN_CENTRAL_PASSPHRASE }}

bedrock-codec/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dependencies {
2-
api(projects.common)
2+
api(project(":common"))
33
api(platform(libs.fastutil.bom))
44
api(libs.netty.buffer)
55
api(libs.fastutil.long.common)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dependencies {
2-
api(projects.bedrockCodec)
2+
api(project(":bedrock-codec"))
33
api(libs.netty.transport.raknet)
44
api(libs.snappy)
55
}

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ subprojects {
4444
}
4545

4646
java {
47-
withJavadocJar()
4847
withSourcesJar()
4948
toolchain {
5049
languageVersion.set(JavaLanguageVersion.of(21))

settings.gradle.kts

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
1-
@file:Suppress("UnstableApiUsage")
2-
3-
pluginManagement {
4-
repositories {
5-
mavenCentral()
6-
gradlePluginPortal()
7-
}
8-
}
9-
dependencyResolutionManagement {
10-
repositories {
11-
mavenLocal()
12-
mavenCentral()
13-
maven("https://repo.opencollab.dev/maven-releases")
14-
maven("https://repo.opencollab.dev/maven-snapshots")
15-
}
16-
}
17-
18-
plugins {
19-
id("org.gradle.toolchains.foojay-resolver-convention") version ("0.8.0")
20-
}
21-
22-
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
23-
241
rootProject.name = "protocol"
252

26-
include("bedrock-codec", "bedrock-connection", "common")
3+
include(":common")
4+
include(":bedrock-codec")
5+
include(":bedrock-connection")

0 commit comments

Comments
 (0)