Fix buildscript (again)
This commit is contained in:
parent
a6295cbc86
commit
6a9e414527
2 changed files with 78 additions and 71 deletions
143
build.gradle
143
build.gradle
|
@ -1,10 +1,15 @@
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
jcenter()
|
||||||
name = "forge"
|
//maven {
|
||||||
url = "http://files.minecraftforge.net/maven"
|
// name = "forge"
|
||||||
}
|
// url = "http://files.minecraftforge.net/maven"
|
||||||
|
//}
|
||||||
|
maven {
|
||||||
|
name = "gt"
|
||||||
|
url = "https://gregtech.overminddl1.com/"
|
||||||
|
}
|
||||||
maven {
|
maven {
|
||||||
name = "sonatype"
|
name = "sonatype"
|
||||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||||
|
@ -15,10 +20,30 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'forge'
|
// Because Forge is too stupid to fix Deprecation Issues, and we cannot fix it on our end! (until we fork Forge)
|
||||||
apply plugin: 'idea'
|
allprojects {
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.compilerArgs << "-Xlint:deprecation"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
idea.module.inheritOutputDirs = true
|
apply plugin: 'eclipse'
|
||||||
|
eclipse {
|
||||||
|
classpath {
|
||||||
|
downloadJavadoc = true
|
||||||
|
downloadSources = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'idea'
|
||||||
|
idea{
|
||||||
|
module {
|
||||||
|
downloadJavadoc = true
|
||||||
|
downloadSources = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'forge'
|
||||||
|
|
||||||
file "build.properties" withReader {
|
file "build.properties" withReader {
|
||||||
def prop = new Properties()
|
def prop = new Properties()
|
||||||
|
@ -26,24 +51,24 @@ file "build.properties" withReader {
|
||||||
ext.config = new ConfigSlurper().parse prop
|
ext.config = new ConfigSlurper().parse prop
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
|
||||||
tasks.withType(JavaCompile) {
|
|
||||||
options.compilerArgs << "-Xlint:deprecation"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
version = "${config.gt.version}"
|
version = "${config.gt.version}"
|
||||||
group= "gregtech"
|
group= "gregtech"
|
||||||
archivesBaseName = "gregtech"
|
archivesBaseName = "gregtech"
|
||||||
|
|
||||||
sourceCompatibility = 1.7
|
sourceCompatibility = 1.7
|
||||||
targetCompatibility = 1.7
|
targetCompatibility = 1.7
|
||||||
|
compileJava.options.bootClasspath = org.gradle.internal.jvm.Jvm.current().getJre().getHomeDir().toString() +"/lib/rt.jar"
|
||||||
|
compileJava {
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "${config.minecraft.version}-${config.forge.version}"
|
version = "${config.minecraft.version}-${config.forge.version}"
|
||||||
runDir = "eclipse"
|
runDir = "eclipse"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
idea { module { inheritOutputDirs = true } }
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
provided
|
provided
|
||||||
embedded
|
embedded
|
||||||
|
@ -51,41 +76,21 @@ configurations {
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
//maven {
|
maven {
|
||||||
// name 'Forge'
|
name = "gt"
|
||||||
// url 'http://files.minecraftforge.net/maven'
|
url = "http://gregtech.overminddl1.com/"
|
||||||
//}
|
}
|
||||||
maven {
|
maven {
|
||||||
name = "gt"
|
name = "ic2"
|
||||||
url = "https://gregtech.overminddl1.com/"
|
url = "http://maven.ic2.player.to/"
|
||||||
}
|
}
|
||||||
maven {
|
|
||||||
name = "chickenbones"
|
|
||||||
url = "http://chickenbones.net/maven/"
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
name = "ic2, forestry"
|
|
||||||
url = "http://maven.ic2.player.to/"
|
|
||||||
}
|
|
||||||
maven { // EnderIO & EnderCore
|
|
||||||
name 'tterrag Repo'
|
|
||||||
url "http://maven.tterrag.com"
|
|
||||||
}
|
|
||||||
maven { // AppleCore
|
|
||||||
url "http://www.ryanliptak.com/maven/"
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
name = "Covers (COFH)"
|
|
||||||
url = "http://maven.covers1624.net/"
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
name = "local"
|
|
||||||
url = "file:///C:/Users/michael/Documents/forge/maven/"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile "ic2:IC2Classic:1.2.1.8:dev"
|
// compile fileTree(dir: 'libs', include: '*.jar')
|
||||||
|
|
||||||
|
// Mostly Used for compileOnly, if you prefer normal IC2, uncomment it instead.
|
||||||
|
provided "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
|
||||||
|
|
||||||
compile "mcp.mobius.waila:Waila:1.5.11-RC2-NONEI_1.7.10:dev"
|
compile "mcp.mobius.waila:Waila:1.5.11-RC2-NONEI_1.7.10:dev"
|
||||||
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
|
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
|
||||||
|
@ -110,6 +115,7 @@ dependencies {
|
||||||
compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
|
compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
|
||||||
compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
|
compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
|
||||||
compileOnly "com.shedar.IC2NuclearControl:IC2NuclearControl:2.4.3a:dev"
|
compileOnly "com.shedar.IC2NuclearControl:IC2NuclearControl:2.4.3a:dev"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources
|
processResources
|
||||||
|
@ -118,34 +124,35 @@ processResources
|
||||||
inputs.property "version", project.version
|
inputs.property "version", project.version
|
||||||
inputs.property "mcversion", project.minecraft.version
|
inputs.property "mcversion", project.minecraft.version
|
||||||
|
|
||||||
ext.srcFiles = "$projectDir/src/main/resources"
|
// replace stuff in mcmod.info, nothing else
|
||||||
ext.destDir = "$projectDir/build/classes/main"
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
|
|
||||||
// registering inputs & outputs allow gradle to skip if UP-TO-DATE
|
|
||||||
inputs.files srcFiles
|
|
||||||
outputs.dir destDir
|
|
||||||
|
|
||||||
println 'starting processResources'
|
|
||||||
println 'srcFiles: ' + srcFiles
|
|
||||||
println 'destDir: ' + destDir
|
|
||||||
|
|
||||||
|
|
||||||
copy {
|
|
||||||
// replace stuff in mcmod.info, nothing else
|
|
||||||
from(srcFiles)
|
|
||||||
into(destDir)
|
|
||||||
include 'mcmod.info'
|
include 'mcmod.info'
|
||||||
// replace version and mcversion
|
|
||||||
expand 'version': project.version, 'mcversion': project.minecraft.version
|
|
||||||
|
|
||||||
|
// replace version and mcversion
|
||||||
|
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// copy everything else, thats not the mcmod.info
|
||||||
copy {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
// copy everything else, thats not the mcmod.info
|
|
||||||
from(srcFiles)
|
|
||||||
into(destDir)
|
|
||||||
exclude 'mcmod.info'
|
exclude 'mcmod.info'
|
||||||
|
}
|
||||||
|
exclude '**/Thumbs.db'
|
||||||
|
}
|
||||||
|
|
||||||
|
task sourceJar(type: Jar) {
|
||||||
|
from sourceSets.main.allSource
|
||||||
|
classifier = 'sources'
|
||||||
|
}
|
||||||
|
|
||||||
|
task devJar(type: Jar) {
|
||||||
|
from sourceSets.main.output
|
||||||
|
classifier = 'dev'
|
||||||
|
manifest {
|
||||||
|
//attributes 'FMLCorePlugin': 'WhateverLoaderClass'
|
||||||
|
//attributes 'FMLCorePluginContainsFMLMod': 'true'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives devJar
|
||||||
|
}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -3,4 +3,4 @@ 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.2.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.2-bin.zip
|
Loading…
Reference in a new issue