diff --git a/.gitignore b/.gitignore index d95c95de..157dad60 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ run/* .gradle/ *.bat +.classpath +.project +.settings/** \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3e69005a..ff4e9b34 100644 --- a/build.gradle +++ b/build.gradle @@ -1,20 +1,29 @@ buildscript { repositories { mavenCentral() + jcenter() + maven { + name = "gt" + url = "https://gregtech.overminddl1.com/" + } maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { - name = "sonatype" - url = "https://oss.sonatype.org/content/repositories/snapshots/" + name = "jitpack" + url = "https://jitpack.io" } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' + classpath "com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT" } } +plugins { + id("org.ajoberstar.grgit") version("3.1.1") +} + //add dependency repositories repositories { maven { @@ -23,9 +32,24 @@ repositories { } } +apply plugin: "java" +apply plugin: "idea" apply plugin: 'forge' -group = "codechicken" // http://maven.apache.org/guides/mini/guide-naming-conventions.html +idea { + module { + inheritOutputDirs = true + downloadJavadoc = true + downloadSources = true + } +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +group = "codechicken" archivesBaseName = "NotEnoughItems" // Define properties file @@ -37,18 +61,19 @@ configFile.withReader { prop.load(it) project.ext.config = new ConfigSlurper().parse prop } +// +//configurations.all { +// resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS) +// setTransitive(false) +//} dependencies { compile "codechicken:CodeChickenLib:${config.mc_version}-${config.ccl_version}:dev" compile "codechicken:CodeChickenCore:${config.mc_version}-${config.ccc_version}:dev" } -version = "${project.config.mod_version}" -sourceCompatibility = JavaVersion.VERSION_1_8 -targetCompatibility = JavaVersion.VERSION_1_8 -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +version = "${project.config.mod_version}" println config.mc_version + "-" + config.forge_version // Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here @@ -81,6 +106,11 @@ processResources { // Move access transformer to META-INF rename '(.+_at.cfg)', 'META-INF/$1' +// +// // copy everything else, that's not the mcmod.info +// from(sourceSets.main.resources.srcDirs) { +// exclude "mcmod.info" +// } } version = "${project.minecraft.version}-${project.version}" @@ -90,19 +120,19 @@ def commonManifest = { } jar { - classifier = 'universal' + getArchiveClassifier().set("universal") manifest commonManifest } task sourceJar(type: Jar) { from sourceSets.main.java from new File(root, "dev") - classifier = 'src' + getArchiveClassifier().set("src") } task devJar(type: Jar) { from sourceSets.main.output - classifier = 'dev' + getArchiveClassifier().set("dev") manifest commonManifest } @@ -110,21 +140,3 @@ task devJar(type: Jar) { artifacts { archives sourceJar, devJar } - -sourceSets { - main { output.resourcesDir = output.classesDir } -} - -// Configure an upload task. -uploadArchives { - dependsOn 'reobf' - if (project.hasProperty("local_maven")) { - repositories { - logger.info('Publishing to local maven repo') - - mavenDeployer { - repository(url: "file://${local_maven}") - } - } - } -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d9b7505b..5c2d1cf0 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2c2bbe5f..5028f28f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip diff --git a/gradlew b/gradlew index cccdd3d5..83f2acfd 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -109,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` diff --git a/gradlew.bat b/gradlew.bat index f9553162..9618d8d9 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome