parent
a32b94a657
commit
c322cbd3de
|
@ -16,3 +16,4 @@
|
||||||
!/LICENSE
|
!/LICENSE
|
||||||
!/README.md
|
!/README.md
|
||||||
!/settings.gradle
|
!/settings.gradle
|
||||||
|
!/Jenkinsfile
|
|
@ -0,0 +1,15 @@
|
||||||
|
node {
|
||||||
|
stage 'Checkout'
|
||||||
|
|
||||||
|
checkout scm
|
||||||
|
|
||||||
|
stage 'Build'
|
||||||
|
|
||||||
|
sh "rm -rf build/libs/"
|
||||||
|
sh "chmod +x gradlew"
|
||||||
|
sh "./gradlew build"
|
||||||
|
|
||||||
|
stage "Archive artifacts"
|
||||||
|
|
||||||
|
sh "./gradlew upload"
|
||||||
|
}
|
83
build.gradle
83
build.gradle
|
@ -5,16 +5,17 @@ plugins {
|
||||||
|
|
||||||
id 'idea'
|
id 'idea'
|
||||||
id 'eclipse'
|
id 'eclipse'
|
||||||
|
|
||||||
id 'net.minecrell.licenser' version '0.2.1'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
|
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/maven.gradle'
|
||||||
|
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.gradle'
|
||||||
|
|
||||||
group = 'net.fabricmc'
|
group = 'net.fabricmc'
|
||||||
archivesBaseName = project.name.toLowerCase()
|
archivesBaseName = project.name.toLowerCase()
|
||||||
version = '0.0.2-SNAPSHOT'
|
version = '0.0.3-SNAPSHOT'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -40,22 +41,15 @@ configurations {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile gradleApi()
|
compile gradleApi()
|
||||||
shade 'org.zeroturnaround:zt-zip:1.9'
|
|
||||||
shade 'org.slf4j:slf4j-api:1.7.21'
|
|
||||||
shade 'org.slf4j:slf4j-simple:1.7.21'
|
|
||||||
shade 'com.google.code.gson:gson:2.6.2'
|
|
||||||
shade 'commons-io:commons-io:1.4'
|
|
||||||
shade 'com.google.guava:guava:19.0'
|
|
||||||
shade 'net.fabricmc:blending-jar:0.1.1.6'
|
|
||||||
shade 'net.fabricmc:enigma:+'
|
|
||||||
shade 'org.javassist:javassist:3.+'
|
|
||||||
shade 'org.bitbucket.mstrobel:procyon-compilertools:0.5.33.6-enigma'
|
|
||||||
shade 'de.sciss:syntaxpane:1.1.+'
|
|
||||||
}
|
|
||||||
|
|
||||||
license {
|
shade 'org.zeroturnaround:zt-zip:1.9'
|
||||||
header file('HEADER')
|
shade 'org.slf4j:slf4j-api:1.7.21'
|
||||||
include '**/*.java'
|
shade 'org.slf4j:slf4j-simple:1.7.21'
|
||||||
|
shade 'com.google.code.gson:gson:2.6.2'
|
||||||
|
shade 'commons-io:commons-io:1.4'
|
||||||
|
shade 'com.google.guava:guava:19.0'
|
||||||
|
shade 'net.fabricmc:weave:0.1.0.6'
|
||||||
|
shade 'cuchaz:enigma:0.11.0.5:lib'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
@ -73,58 +67,7 @@ jar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadArchives {
|
|
||||||
repositories {
|
|
||||||
mavenDeployer {
|
|
||||||
if (project.hasProperty('mavenPass')) {
|
|
||||||
repository(url: 'http://mavenupload.modmuss50.me/') {
|
|
||||||
authentication(userName: 'buildslave', password: project.getProperty('mavenPass'))
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
repository(url: 'file:///var/www/maven/')
|
|
||||||
}
|
|
||||||
|
|
||||||
pom {
|
|
||||||
artifactId = project.archivesBaseName
|
|
||||||
|
|
||||||
project {
|
|
||||||
name = project.name
|
|
||||||
description = project.description
|
|
||||||
packaging = 'jar'
|
|
||||||
url = project.url
|
|
||||||
|
|
||||||
scm {
|
|
||||||
url = 'https://github.com/FabricMC/fabric-loom'
|
|
||||||
connection = 'scm:git:git@github.com:FabricMC/fabric-loom.git'
|
|
||||||
developerConnection = 'scm:git:git@github.com:FabricMC/fabric-loom.git'
|
|
||||||
}
|
|
||||||
|
|
||||||
issueManagement {
|
|
||||||
system = 'GitHub'
|
|
||||||
url = 'https://github.com/FabricMC/fabric-loom/issues'
|
|
||||||
}
|
|
||||||
|
|
||||||
licenses {
|
|
||||||
license {
|
|
||||||
name = 'MIT License'
|
|
||||||
url = 'https://github.com/FabricMC/fabric-loom/blob/master/LICENSE'
|
|
||||||
distribution = 'repo'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id = 'modmuss50'
|
|
||||||
name = 'modmuss50'
|
|
||||||
roles { role 'developer' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
gradleVersion = '3.0'
|
gradleVersion = '3.1'
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
#Sat Sep 10 13:02:22 BST 2016
|
#Thu Sep 22 09:58:14 BST 2016
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip
|
||||||
|
|
|
@ -161,4 +161,9 @@ function splitJvmOpts() {
|
||||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||||
|
|
||||||
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
|
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
fi
|
||||||
|
|
||||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||||
|
|
|
@ -49,7 +49,6 @@ goto fail
|
||||||
@rem Get command-line arguments, handling Windows variants
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
|
||||||
|
|
||||||
:win9xME_args
|
:win9xME_args
|
||||||
@rem Slurp the command line arguments.
|
@rem Slurp the command line arguments.
|
||||||
|
@ -60,11 +59,6 @@ set _SKIP=2
|
||||||
if "x%~1" == "x" goto execute
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
set CMD_LINE_ARGS=%*
|
||||||
goto execute
|
|
||||||
|
|
||||||
:4NT_args
|
|
||||||
@rem Get arguments from the 4NT Shell from JP Software
|
|
||||||
set CMD_LINE_ARGS=%$
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class DownloadTask extends DefaultTask {
|
||||||
if (!Constants.MINECRAFT_JSON.get(extension).exists()) {
|
if (!Constants.MINECRAFT_JSON.get(extension).exists()) {
|
||||||
logger.lifecycle(":downloading minecraft json");
|
logger.lifecycle(":downloading minecraft json");
|
||||||
FileUtils.copyURLToFile(new URL("https://launchermeta.mojang.com/mc/game/version_manifest.json"), Constants.VERSION_MANIFEST.get(extension));
|
FileUtils.copyURLToFile(new URL("https://launchermeta.mojang.com/mc/game/version_manifest.json"), Constants.VERSION_MANIFEST.get(extension));
|
||||||
ManifestVersion mcManifest = new GsonBuilder().create().fromJson(FileUtils.readFileToString(Constants.VERSION_MANIFEST.get(extension), Charset.defaultCharset()), ManifestVersion.class);
|
ManifestVersion mcManifest = new GsonBuilder().create().fromJson(FileUtils.readFileToString(Constants.VERSION_MANIFEST.get(extension), "UTF-8"), ManifestVersion.class);
|
||||||
|
|
||||||
Optional<ManifestVersion.Versions> optionalVersion = mcManifest.versions.stream().filter(versions -> versions.id.equalsIgnoreCase(extension.version)).findFirst();
|
Optional<ManifestVersion.Versions> optionalVersion = mcManifest.versions.stream().filter(versions -> versions.id.equalsIgnoreCase(extension.version)).findFirst();
|
||||||
if (optionalVersion.isPresent()) {
|
if (optionalVersion.isPresent()) {
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class GenVSCodeProjectTask extends DefaultTask {
|
||||||
element = new JsonPrimitive("vscode");
|
element = new JsonPrimitive("vscode");
|
||||||
jsonObject.add("outputDirectory", element);
|
jsonObject.add("outputDirectory", element);
|
||||||
|
|
||||||
FileUtils.write(configFile, gson.toJson(jsonObject), Charset.defaultCharset());
|
FileUtils.writeStringToFile(configFile, gson.toJson(jsonObject), "UF-8");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
|
|
||||||
package net.fabricmc.loom.task;
|
package net.fabricmc.loom.task;
|
||||||
|
|
||||||
import net.fabricmc.blendingjar.JarMerger;
|
|
||||||
import net.fabricmc.loom.LoomGradleExtension;
|
import net.fabricmc.loom.LoomGradleExtension;
|
||||||
import net.fabricmc.loom.util.Constants;
|
import net.fabricmc.loom.util.Constants;
|
||||||
|
import net.fabricmc.weave.merge.JarMerger;
|
||||||
import org.gradle.api.DefaultTask;
|
import org.gradle.api.DefaultTask;
|
||||||
import org.gradle.api.tasks.TaskAction;
|
import org.gradle.api.tasks.TaskAction;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue