diff --git a/build.gradle b/build.gradle index 129d6a9..da49aa0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1656003793falsepattern58 +//version: 1656003793falsepattern63 /* DO NOT CHANGE THIS FILE! @@ -257,7 +257,9 @@ minecraft { runDir = "run" if (replaceGradleTokenInFile) { - replaceIn replaceGradleTokenInFile + for (file in replaceGradleTokenInFile.split(',')) { + replaceIn file + } if(gradleTokenModId) { replace gradleTokenModId, modId } @@ -280,9 +282,13 @@ if(file("addon.gradle").exists()) { apply from: 'repositories.gradle' configurations { - implementation.extendsFrom(shadowImplementation) // TODO: remove after all uses are refactored - implementation.extendsFrom(shadowCompile) - implementation.extendsFrom(shadeCompile) + for (config in [shadowImplementation, shadowCompile, shadeCompile]) { + implementation.extendsFrom(shadeCompile) + compileClasspath.extendsFrom(config) + runtimeClasspath.extendsFrom(config) + testCompileClasspath.extendsFrom(config) + testRuntimeClasspath.extendsFrom(config) + } } repositories { @@ -312,11 +318,19 @@ dependencies { compile("org.spongepowered:mixin:0.8.5-gasstation_7") compile("com.llamalad7:MixinExtras:0.1.1-gasstation") compile("com.falsepattern:00gasstation-mc1.7.10:0.5.1:dev") + runtimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16') + testRuntimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16') } else if(hasMixinDeps.toBoolean()) { runtime("com.llamalad7:MixinExtras:0.1.1-gasstation") runtime("org.spongepowered:mixin:0.8.5-gasstation_7") runtime("com.falsepattern:00gasstation-mc1.7.10:0.5.1:dev") } + // Latest LWJGL + compile "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209" + compile "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209" + minecraftNatives "org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209" + minecraftDeps "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209" + minecraftDeps "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209" } apply from: 'dependencies.gradle' @@ -656,12 +670,16 @@ def getCredentials = { } //Publishing -publish.dependsOn(build) publishing { publications { maven(MavenPublication) { - artifact source: usesShadowedDependencies.toBoolean() ? shadowJar : jar, classifier: "" - artifact source: sourcesJar, classifier: "sources" + from components.java + if (usesShadowedDependencies.toBoolean()) { + artifact source: shadowJar, classifier: "" + } + if (!project.hasProperty("noPublishedSources") || !noPublishedSources) { + artifact source: sourcesJar, classifier: "sources" + } artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev" if (apiPackage) { artifact source: apiJar, classifier: "api" @@ -707,6 +725,12 @@ publishing { } } +tasks.withType(PublishToMavenRepository) { task -> + dependsOn("build") +} + +publishToMavenLocal.dependsOn("build") + if (project.changelog == "") { File changelogFile = new File(System.getenv("CHANGELOG_FILE") ?: "CHANGELOG.md") if (changelogFile.exists()) { @@ -1057,7 +1081,7 @@ def deobf(String sourceURL, String rawFileName) { } exec { - commandLine 'java', '-jar', bon2File, '--inputJar', obfFile, '--outputJar', deobfFile, '--mcVer', minecraftVersion, '--mappingsVer', mappingsVer, '--notch' + commandLine Paths.get(System.getProperty("java.home"), "bin", "java").toAbsolutePath().toString(), '-jar', bon2File, '--inputJar', obfFile, '--outputJar', deobfFile, '--mcVer', minecraftVersion, '--mappingsVer', mappingsVer, '--notch' workingDir bon2Dir standardOutput = new FileOutputStream("${deobfFile}.log") }