Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e282cc2
update to new (hopefully correct) action
kxmpxtxnt May 7, 2025
4409b4c
Merge pull request #79 from SilkMC/fix-publishing
kxmpxtxnt May 7, 2025
082c736
fix paper requiring current version of other modules
kxmpxtxnt May 7, 2025
fcf889a
Revert "fix paper requiring current version of other modules"
kxmpxtxnt May 7, 2025
31c41fc
remove silk-paper from settings.gradle.kts
kxmpxtxnt May 7, 2025
d26db91
fix missing toolchain java version, fix incorrect test
kxmpxtxnt May 7, 2025
3106c03
add --stacktrace for more information
kxmpxtxnt May 7, 2025
5067615
add more memory to actual task
kxmpxtxnt May 7, 2025
3711f3d
give more memory to any jvm based task
kxmpxtxnt May 7, 2025
3e7296b
Revert "give more memory to any jvm based task"
kxmpxtxnt May 7, 2025
c8ec8c3
Revert "add more memory to actual task"
kxmpxtxnt May 7, 2025
73ec22a
Revert "add --stacktrace for more information"
kxmpxtxnt May 7, 2025
21f12e0
Revert "fix missing toolchain java version, fix incorrect test"
kxmpxtxnt May 7, 2025
3c54c4a
Revert "remove silk-paper from settings.gradle.kts"
kxmpxtxnt May 7, 2025
df73d79
Reapply "fix paper requiring current version of other modules"
kxmpxtxnt May 7, 2025
f3a64db
Revert "fix paper requiring current version of other modules"
kxmpxtxnt May 7, 2025
c1ab6f3
Merge remote-tracking branch 'origin/main' into publish
kxmpxtxnt Jun 11, 2025
26e42d4
increase gradle memory
kxmpxtxnt Jun 11, 2025
22460ed
update gradle action
kxmpxtxnt Jul 3, 2025
df9fde3
use compilerOptions dsl, add higher memory limit
kxmpxtxnt Jul 3, 2025
9179e7a
removed MaxPermSize option
kxmpxtxnt Jul 3, 2025
d136832
removed FileEncoding option
kxmpxtxnt Jul 3, 2025
b82691f
remove memory limit from gradle properties, add it to build action
kxmpxtxnt Jul 3, 2025
5e336ec
add signing in ci
kxmpxtxnt Jul 5, 2025
63d761d
add no-daemon + stacktrace option to gradle
kxmpxtxnt Jul 5, 2025
1a8279c
removed hard coded memory minimum
kxmpxtxnt Jul 5, 2025
8e13475
Merge remote-tracking branch 'origin/main' into publish
kxmpxtxnt Sep 2, 2025
45f3458
use vanniktecks publishing plugin
kxmpxtxnt Sep 2, 2025
18e69b7
Merge branch 'main' into publish
kxmpxtxnt Jun 16, 2026
fed1469
Merge remote-tracking branch 'origin/main' into publish
kxmpxtxnt Jun 20, 2026
e96bbad
merge
kxmpxtxnt Jun 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,20 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6

- name: Setup Gradle Properties
run: echo "org.gradle.jvmargs=-Xmx2g" >> gradle.properties

- name: Execute Gradle build
run: ./gradlew build
run: ./gradlew build --no-daemon --stacktrace

- name: Publish to Ossrh
run: ./gradlew publishAllPublicationsToOssrhRepository -PossrhUsername=${{ secrets.OSSRH_USERNAME }} -PossrhPassword=${{ secrets.OSSRH_PASSWORD }}
run: ./gradlew publishToMavenCentral
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}

- name: Publish to Modrinth
run: ./gradlew :silk-all:modrinth -Pmodrinth.token=${{ secrets.MODRINTH_TOKEN }}
run: ./gradlew :silk-all:modrinth -Pmodrinth.token=${{ secrets.MODRINTH_TOKEN }}
2 changes: 2 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ dependencies {
implementation(pluginDep("io.papermc.paperweight.userdev", "1.7.2"))
implementation(pluginDep("xyz.jpenilla.run-paper", "2.3.0"))

implementation(pluginDep("com.vanniktech.maven.publish", "0.34.0"))

val compileDokkaVersion = "1.9.20"
val dokkaVersion = "1.9.20"

Expand Down
79 changes: 28 additions & 51 deletions buildSrc/src/main/kotlin/project-publish-script.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,67 +1,44 @@
import BuildConstants.authors
import BuildConstants.githubRepo
import BuildConstants.isSnapshot
import com.vanniktech.maven.publish.KotlinJvm

plugins {
kotlin("jvm")

`maven-publish`
signing
id("com.vanniktech.maven.publish")
}

publishing {
repositories {
maven {
name = "ossrh"
credentials(PasswordCredentials::class)
setUrl(
if (!isSnapshot)
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
else
"https://s01.oss.sonatype.org/content/repositories/snapshots"
)
}
}
mavenPublishing {
configure(KotlinJvm())

publications {
register<MavenPublication>(project.name) {
// publish main jars
from(components["java"])
publishToMavenCentral(false)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to directly publish the components, instead of pressing publish everytime in the sonatype deployment area we can achieve this by setting this to true


this.groupId = project.group.toString()
this.artifactId = project.name
this.version = rootProject.version.toString()
signAllPublications()

pom {
name.set(project.name)
description.set(project.description)
pom {
name = project.name
description = project.description

developers {
authors.forEach {
developer {
name.set(it)
}
}
developers {
authors.forEach {
developer {
name = it
}
}
}

licenses {
license {
name.set("GNU General Public License 3")
url.set("https://www.gnu.org/licenses/gpl-3.0.txt")
}
}
licenses {
license {
name = "GNU General Public License 3"
url = "https://www.gnu.org/licenses/gpl-3.0.txt"
distribution = "https://www.gnu.org/licenses/gpl-3.0.txt"
}
}

url.set("https://github.com/${githubRepo}")
url = "https://github.com/$githubRepo"

scm {
connection.set("scm:git:git://github.com/${githubRepo}.git")
url.set("https://github.com/${githubRepo}/tree/main")
}
}
scm {
connection = "scm:git:git://github.com/$githubRepo.git"
url = "https://github.com/$githubRepo/tree/main"
developerConnection = "cm:git:ssh://git@github.com/$githubRepo.git"
}
}
}

signing {
sign(publishing.publications)
}
}