Workaround for gradle issue with jar signing.

This commit is contained in:
LexManos 2018-11-13 16:32:55 -08:00
parent 5110796591
commit 506d5b18de
2 changed files with 19 additions and 21 deletions

View File

@ -1,7 +1,7 @@
buildscript {
repositories {
mavenLocal()
maven { url = 'http://files.minecraftforge.net/maven' }
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
@ -30,6 +30,17 @@ plugins {
}
apply plugin: 'eclipse'
ext {
JAR_SIGNER = null
if (project.hasProperty('keystore')) {
JAR_SIGNER = [
storepass: project.properties.keystoreStorePass,
keypass: project.properties.keystoreKeyPass,
keystore: project.properties.keystore
]
}
}
project(':mcp') {
apply plugin: 'net.minecraftforge.gradle.forgedev.mcp'
mcp {
@ -95,14 +106,6 @@ project(':forge') {
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
MCP_ARTIFACT = project(':mcp').mcp.config
MCP_VERSION = project(':mcp').mcp.config.version.split('-')[1] // The timestamp only.
if (project.hasProperty('keystore')) {
jarsigner = [
storepass: project.properties.keystoreStorePass,
keypass: project.properties.keystoreKeyPass,
keystore: project.properties.keystore
]
}
}
patcher {
parent = project(':clean')
@ -613,13 +616,10 @@ project(':forge') {
task signUniversal(type: SignJar, dependsOn: universalJar) {
onlyIf {
project.hasProperty('jarsigner') && universalJar.state.failure == null
JAR_SIGNER != null && universalJar.state.failure == null
}
def jarsigner = [:];
if (project.hasProperty('jarsigner'))
jarsigner = project.jarsigner;
def jarsigner = JAR_SIGNER == null ? [:] : JAR_SIGNER
alias = 'forge'
storePass = jarsigner.storepass
keyPass = jarsigner.keypass
@ -663,13 +663,10 @@ project(':forge') {
}
task signInstaller(type: SignJar, dependsOn: installerJar) {
onlyIf {
project.hasProperty('jarsigner') && installerJar.state.failure == null
JAR_SIGNER != null && installerJar.state.failure == null
}
def jarsigner = [:];
if (project.hasProperty('jarsigner'))
jarsigner = project.jarsigner;
def jarsigner = JAR_SIGNER == null ? [:] : JAR_SIGNER
alias = 'forge'
storePass = jarsigner.storepass
keyPass = jarsigner.keypass
@ -775,7 +772,7 @@ project(':forge') {
username project.properties.forgeMavenUser
password project.properties.forgeMavenPassword
}
url 'http://files.minecraftforge.net/maven/manage/upload'
url 'https://files.minecraftforge.net/maven/manage/upload'
} else {
url 'file://' + rootProject.file('repo').getAbsolutePath()
}

View File

@ -1,7 +1,7 @@
buildscript {
repositories {
mavenLocal()
maven { url = 'http://files.minecraftforge.net/maven' }
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
@ -18,6 +18,7 @@ buildscript {
}
apply plugin: 'net.minecraftforge.gradle'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
repositories {
maven { url ='file://' + file('../repo').absolutePath } //Used by Forge development testing only, you can delete this.