Skip to content

Commit

Permalink
不使用RandomOBF了
Browse files Browse the repository at this point in the history
  • Loading branch information
EarzuChan committed Aug 15, 2024
1 parent c717457 commit edb1f25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 42 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
./gradlew
:launcher-old:packAll
:launcher-old:copyApi
:launcher-old:randomObf
- name: 群友们已经加载好了启动页动画
uses: actions/upload-artifact@v2
with:
Expand Down
49 changes: 8 additions & 41 deletions launcher-old/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,53 +46,20 @@ task copyApi(type: Copy) {
from(project(':api-old').tasks.jar.outputs.files)
}

({
def pck = UUID.randomUUID().toString() + '.' + UUID.randomUUID().toString()

task randomObf_objSrc(type: ShadowJar) {
archiveBaseName.set('jvm-hook-framework')

from sourceSets.main.output
dependsOn configurations.runtimeClasspath
archiveClassifier.set('launcher')

manifest {
attributes([
'Premain-Class': pck + '.Launcher'
])
}

archiveClassifier.set('obf')
relocate 'io.github.karlatemp.jvmhook.launcher', pck
}

task randomObf(type: Jar) {
archiveBaseName.set('jvm-hook-framework')

from(zipTree(tasks.randomObf_objSrc.outputs.files.first()))
dependsOn tasks.randomObf_objSrc
archiveClassifier.set('launcher-obf')

from(files(tasks.packCore.outputs)) { conf ->
conf.into(pck.replace('.', '/'))
conf.rename { 'classes.jar' }
}

manifest {
attributes([
'Premain-Class': pck + '.Launcher'
])
}
exclude 'io/**'
exclude 'io'
}
})()
repositories {
mavenCentral()
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

kotlin {
jvmToolchain(21)
}

0 comments on commit edb1f25

Please sign in to comment.