Update build script and gradle

This commit is contained in:
Jason Mitchell authored and Jason Mitchell committed 2021-04-12 20:20:36 -07:00
1 parent ca9c2a4052
commit 40ff91a908
6 files changed
+82 -35

No files matched your search

+3
View File
@@ -10,3 +10,6 @@ run/*
.gradle/
*.bat
.classpath
.project
.settings/**
+42 -30
View File
@@ -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}")
}
}
}
}
Binary file not shown.
+1 -1
View File
@@ -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
Vendored
+19 -3
View File
@@ -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"`
Vendored
+17 -1
View File
@@ -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