diff options
| author | basdxz <tudurap.com@gmail.com> | 2021-01-06 12:17:58 +0000 |
|---|---|---|
| committer | basdxz <tudurap.com@gmail.com> | 2021-01-06 12:17:58 +0000 |
| commit | eb89cfd8cb58e621e247afa594c80359c7ec96fa (patch) | |
| tree | 8db11a58cf8265accf0a679be8492d7ab1388608 | |
| parent | 8ec2f63dc20b0b38e69d258b0bd156b35d006fe9 (diff) | |
| download | GT5-Unofficial-eb89cfd8cb58e621e247afa594c80359c7ec96fa.tar.gz GT5-Unofficial-eb89cfd8cb58e621e247afa594c80359c7ec96fa.tar.bz2 GT5-Unofficial-eb89cfd8cb58e621e247afa594c80359c7ec96fa.zip | |
whacky sign attempt
| -rw-r--r-- | build.gradle.kts | 43 | ||||
| -rw-r--r-- | gradle.properties | 4 |
2 files changed, 26 insertions, 21 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 765009726d..7821683664 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,6 +19,7 @@ plugins { java signing } + apply(plugin = "forge") //Downloads Javadocs and sources by default @@ -53,9 +54,10 @@ val Project.minecraft: UserExtension //TODO Delete this! This exists to load the configs from the real properties file, which is needed for Jenkins to build //Gradle will load gradle.properties from it's home, it's install, and the project folder. Clearly whoever setup the //Jenkins jar signing needs to be reminded of this! -val fis = FileInputStream("real.gradle.properties") val prop = Properties() -prop.load(fis) +prop.load(FileInputStream("real.gradle.properties")) +val propSign = Properties() +propSign.load(FileInputStream("gradle.properties")) //TODO Delete val projectVersion: String = prop.getProperty("projectVersion") @@ -237,26 +239,25 @@ artifacts { this.archives(devJar) } -tasks.register("signJar") { - dependsOn("reobf") +signing { + sign(tasks["jar"]) } -//TODO Convert Sign Jar to Kotlin -//task signJar(dependsOn: 'reobf') { -// doLast { -// ant.signjar( -// destDir: jar.destinationDir, -// jar: jar.getArchivePath(), -// alias: findProperty('keyStoreAlias') ?: '', -// keystore: findProperty('keyStore') ?: '', -// storepass: findProperty('keyStorePass') ?: '', -// digestalg: findProperty('signDigestAlg') ?: '', -// tsaurl: findProperty('signTSAurl') ?: '', -// verbose: true -// ) -// } -//} +tasks.named("signJar") { + extra["signing.keyId"] = propSign.getProperty("keyStoreAlias") + extra["signing.secretKeyRingFile"] = propSign.getProperty("keyStore") + extra["signing.password"] = propSign.getProperty("keyStorePass") + dependsOn(":reobf") +} -//signing { -// sign(tasks["reobf"]) +//task signJar(type: SignJar, dependsOn: reobfJar) { +// // findProperty allows us to reference the property without it existing. +// // Using project.propName would cause the script to fail validation if +// // the property did not exist. +// keyStore = project.findProperty('keyStore') +// alias = project.findProperty('keyStoreAlias') +// storePass = project.findProperty('keyStorePass') +// keyPass = project.findProperty('keyStoreKeyPass') +// inputFile = jar.archivePath +// outputFile = jar.archivePath //}
\ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000000..83dd93b556 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,4 @@ +#Dummy File, replaced in Jenkins +keyStoreAlias=w +keyStore=w +keyStorePass=w
\ No newline at end of file |
