Updated Jar Signing

This commit is contained in:
Tschipp 2020-05-05 10:22:13 +02:00
parent 11e259369f
commit 07426f8acd
3 changed files with 26 additions and 13 deletions

18
Jenkinsfile vendored
View File

@ -5,16 +5,20 @@ pipeline {
stages { stages {
stage('Clean') { stage('Clean') {
steps { steps {
echo 'Cleaning Project' withCredentials([file(credentialsId: 'mod_build_secrets', variable: 'ORG_GRADLE_PROJECT_secretFile')]) {
sh 'chmod +x gradlew' echo 'Cleaning Project'
sh './gradlew clean' sh 'chmod +x gradlew'
sh './gradlew clean'
}
} }
} }
stage('Build and Deploy') { stage('Build and Deploy') {
steps { steps {
echo 'Building and Deploying to Maven' withCredentials([file(credentialsId: 'mod_build_secrets', variable: 'ORG_GRADLE_PROJECT_secretFile')]) {
sh './gradlew build publish' echo 'Building and Deploying to Maven'
} sh './gradlew build publish'
}
}
} }
} }
post { post {
@ -22,4 +26,4 @@ pipeline {
archive 'build/libs/**.jar' archive 'build/libs/**.jar'
} }
} }
} }

View File

@ -15,6 +15,15 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply from: 'https://raw.githubusercontent.com/MinecraftModDevelopment/Gradle-Collection/22e7d543a18cd30675277fbfa3669e3d9e206010/generic/secrets.gradle'
import groovy.json.JsonOutput
if (project.hasProperty('secretFile')) {
loadSecrets(new File((String) findProperty('secretFile')))
}
version = "${version}" version = "${version}"
group = "tschipp.carryon" group = "tschipp.carryon"
archivesBaseName = "carryon-${minecraft_version}" archivesBaseName = "carryon-${minecraft_version}"
@ -148,16 +157,16 @@ task signJar(type: SignJar, dependsOn: reobfJar) {
// Skips if the keyStore property is missing. // Skips if the keyStore property is missing.
onlyIf { onlyIf {
project.hasProperty('modkeyStore') project.hasProperty('keyStore')
} }
// findProperty allows us to reference the property without it existing. // findProperty allows us to reference the property without it existing.
// Using project.propName would cause the script to fail validation if // Using project.propName would cause the script to fail validation if
// the property did not exist. // the property did not exist.
keyStore = project.findProperty('modkeyStore') keyStore = project.findProperty('keyStore')
alias = project.findProperty('modkeyStoreAlias') alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('modkeyStorePass') storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('modkeyStoreKeyPass') keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath inputFile = jar.archivePath
outputFile = jar.archivePath outputFile = jar.archivePath
} }

View File

@ -45,7 +45,7 @@ public class CarryOn {
public static final String UPDATE_JSON = "https://gist.githubusercontent.com/Tschipp/dccadee7c90d7a34e6e76a35d9d6fa2e/raw/"; public static final String UPDATE_JSON = "https://gist.githubusercontent.com/Tschipp/dccadee7c90d7a34e6e76a35d9d6fa2e/raw/";
public static final Logger LOGGER = LogManager.getFormatterLogger("CarryOn"); public static final Logger LOGGER = LogManager.getFormatterLogger("CarryOn");
public static final String DEPENDENCIES = "required-after:forge@[13.20.1.2386,);after:gamestages;"; public static final String DEPENDENCIES = "required-after:forge@[13.20.1.2386,);after:gamestages;";
public static final String CERTIFICATE_FINGERPRINT = "55e88f24d04398481ae6f1ce76f65fd776f14227"; public static final String CERTIFICATE_FINGERPRINT = "FD21553434F4905F2F73EA7838147AC4EA07BD88";
public static File CONFIGURATION_FILE; public static File CONFIGURATION_FILE;
public static boolean FINGERPRINT_VIOLATED = false; public static boolean FINGERPRINT_VIOLATED = false;