Skip to content

Commit

Permalink
super experimental changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKR93 committed Nov 3, 2024
1 parent f476809 commit f14e88a
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 29 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout action
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v4

- name: Set up JDK ${{ matrix.java }} ${{ matrix.jdk }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.java }}
java-version: ${{ matrix.jdk }}
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,24 @@ jobs:
- name: Build
run: ./gradlew build --stacktrace

- name: Create Reobf Jar
- name: Create Re-obfuscated Jar
run: ./gradlew createReobfPaperclipJar --stacktrace

- name: Create Mojmap Jar
- name: Create Mojang mapped Jar
run: ./gradlew createMojmapPaperclipJar --stacktrace

- name: Publish Packages
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
env:
ORG_GRADLE_PROJECT_ghName: ${{ github.repository_owner }}
ORG_GRADLE_PROJECT_ghToken: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGN_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGN_PASSWORD }}
SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }}
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}
SIGN_KEYSTORE_DATA: ${{ secrets.SIGN_KEYSTORE_DATA }}
SIGN_KEYSTORE_PASSWORD: ${{ secrets.SIGN_KEYSTORE_PASSWORD }}
run: |
export GITHUB_USERNAME=${{ env.ORG_NAME }}
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
./gradlew publish --stacktrace
- name: Update Sources
Expand Down
35 changes: 26 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
java
`maven-publish`
signing
`kotlin-dsl`
`maven-publish`
`always-up-to-date`
alias(libs.plugins.shadow) apply false
alias(libs.plugins.jarsigner)
alias(libs.plugins.paperweight)
}

Expand All @@ -21,12 +23,20 @@ repositories {
maven("https://repo.papermc.io/repository/maven-public/") {
content { onlyForConfigurations(configurations.paperclip.name) }
}
maven("https://maven.pkg.github.com/PlazmaMC/Plazmaclip") {
name = "githubPackage"

credentials {
username = property("ghName").toString()
password = property("ghToken").toString()
}
}
}

dependencies {
remapper(libs.remapper)
paperclip(libs.plazmaclip)
decompiler(libs.decompiler)
paperclip(libs.paperclip)
}

allprojects {
Expand All @@ -37,11 +47,10 @@ allprojects {

publishing.repositories.maven("https://maven.pkg.github.com/$providerRepo") {
name = "githubPackage"
url = uri("https://maven.pkg.github.com/$providerRepo")

credentials {
username = System.getenv("GITHUB_USERNAME")
password = System.getenv("GITHUB_TOKEN")
username = property("ghName").toString()
password = property("ghToken").toString()
}
}
}
Expand All @@ -51,10 +60,7 @@ subprojects {
withType<JavaCompile>().configureEach {
options.encoding = Charsets.UTF_8.name()
options.release = jdkVersion
options.compilerArgs.addAll(listOf(
"--add-modules=jdk.incubator.vector",
"-Xmaxwarns", "1"
))
options.compilerArgs.addAll(listOf("--add-modules=jdk.incubator.vector"))
}

withType<Javadoc> {
Expand Down Expand Up @@ -171,3 +177,14 @@ publishing {
artifact(tasks.generateDevelopmentBundle) { artifactId = "dev-bundle" }
}
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["devBundle"])
}

jarSigner {
autoDetect("")
}
37 changes: 28 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
org.gradle.daemon = true
org.gradle.caching = true
org.gradle.parallel = true
org.gradle.vfs.watch = false
org.gradle.jvmargs = -Xmx4G -Dfile.encoding=UTF-8 -Dgraal.CompilerConfiguration=community -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true -Dgraal.SpeculativeGuardMovement=true -Dgraal.WriteableCodeCache=true

paper.runMemoryGb = 8
paper.runDisableWatchdog = true

group = org.plazmamc.plazma
brandKey = plazmamc:plazma
brandName = Plazma
providerName = PlazmaMC
providerRepo = PlazmaMC/PlazmaBukkit

########################################################################################################################

paper.runMemoryGb = 8
paper.runDisableWatchdog = true

version = 1.21.3-R0.1-SNAPSHOT
mcVersion = 1.21.3
jdkVersion = 21
Expand All @@ -25,5 +21,28 @@ pufferfishRepo = https://github.com/pufferfish-gg/Pufferfish
pufferfishBranch = ver/1.21
usePufferfish = false

# DO NOT EDIT BELOW; USE ALWAYS-UP-TO-DATE INSTEAD
paperCommit = 92131adaf2687f350b2f8dc7cd1213ab833d1831
purpurCommit = c6802b0a27f1f8faac4ad30f902810fd0ed8051e

########################################################################################################################

org.gradle.caching = true
org.gradle.console = auto
org.gradle.continue = true
org.gradle.daemon = false
org.gradle.daemon.idletimeout = 10800000
org.gradle.parallel = true
org.gradle.vfs.watch = false

# Experimental Options
org.gradle.configuration-cache = false
org.gradle.configureondemand = false
org.gradle.unsafe.isolated-projects = false

# Debug Options
org.gradle.debug = false
org.gradle.caching.debug = false
org.gradle.logging.level = lifecycle
org.gradle.warning.mode = summary
org.gradle.jvmargs = -Xmx4G -Dfile.encoding=UTF-8 -Dgraal.CompilerConfiguration=community -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true -Dgraal.SpeculativeGuardMovement=true -Dgraal.WriteableCodeCache=true
10 changes: 6 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[versions]
shadow = "8.1.1"
paperweight = "1.7.4"
paperclip = "3.0.3"
decompiler = "1.10.1"
remapper = "0.10.3"
jarsigner = "1.0.5"
plazmaclip = "1.0.0-SNAPSHOT"
decompiler = "1.10.1"
paperweight = "1.7.4"

[libraries]
remapper = { group = "net.fabricmc", name = "tiny-remapper", version.ref="remapper" }
plazmaclip = { group = "org.plazmamc", name = "plazmaclip", version.ref = "plazmaclip" }
decompiler = { group = "org.vineflower", name = "vineflower", version.ref = "decompiler" }
paperclip = { group = "io.papermc", name = "paperclip", version.ref = "paperclip" }

[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
jarsigner = { id = "net.minecraftforge.gradlejarsigner", version.ref = "jarsigner" }
paperweight = { id = "io.papermc.paperweight.patcher", version.ref = "paperweight" }

0 comments on commit f14e88a

Please sign in to comment.