Fix dependencies and build setup

This commit is contained in:
Timo Ley 2021-03-14 21:29:55 +01:00
parent 577763a7f8
commit 7a5f6673e5
6 changed files with 26 additions and 24 deletions

View file

@ -3,7 +3,7 @@ buildscript {
mavenCentral() mavenCentral()
maven { maven {
name = "forge" name = "forge"
url = "http://files.minecraftforge.net/maven" url = "https://files.minecraftforge.net/maven"
} }
maven { maven {
name = "sonatype" name = "sonatype"
@ -22,19 +22,19 @@ apply plugin: 'maven'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
ext.buildProps = file "build.properties" ext.buildProps = file "build.properties"
buildProps.withReader { buildProps.withReader {
def prop = new Properties() def prop = new Properties()
prop.load(it) prop.load(it)
ext.config = new ConfigSlurper().parse prop ext.config = new ConfigSlurper().parse prop
} }
group = "resonantinduction" group = "resonantinduction"
archivesBaseName = "${System.getenv().JOB_NAME}" archivesBaseName = "${System.getenv().JOB_NAME}"
minecraft { minecraft {
version = "${rootProject.config.version.minecraft}-${rootProject.config.version.forge}" version = "${rootProject.config.version.minecraft}-${rootProject.config.version.forge}"
replaceIn "Reference.java" replaceIn "Reference.java"
replace "@MAJOR@", rootProject.config.version.mod.major replace "@MAJOR@", rootProject.config.version.mod.major
replace "@MINOR@", rootProject.config.version.mod.minor replace "@MINOR@", rootProject.config.version.mod.minor
@ -47,22 +47,22 @@ subprojects*.apply plugin: 'scala'
allprojects { allprojects {
version = "${config.version.mod.major}.${config.version.mod.minor}.${config.version.mod.revis}" version = "${config.version.mod.major}.${config.version.mod.minor}.${config.version.mod.revis}"
if (System.getenv("BUILD_NUMBER") != null) if (System.getenv("BUILD_NUMBER") != null)
version += ".${System.getenv("BUILD_NUMBER")}" version += ".${System.getenv("BUILD_NUMBER")}"
repositories { repositories {
maven { maven {
name 'Calclavia Maven' name = "tilera"
url 'http://calclavia.com/maven' url = "https://data.tilera.xyz/maven"
} }
maven { maven {
name = "forge" name = "forge"
url = "http://files.minecraftforge.net/maven" url = "https://files.minecraftforge.net/maven"
} }
ivy { ivy {
name 'FMP' name 'FMP'
artifactPattern "http://files.minecraftforge.net/[module]/[module]-dev-[revision].[ext]" artifactPattern "https://files.minecraftforge.net/[module]/[module]-dev-[revision].[ext]"
} }
maven { maven {
name "chickenbones" name "chickenbones"
@ -70,21 +70,23 @@ allprojects {
} }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
compile fileTree(dir: 'lib', include: '*.jar') compile fileTree(dir: 'lib', include: '*.jar')
compile "codechicken:CodeChickenLib:${config.version.minecraft}-${config.version.cclib}:dev" compile "codechicken:CodeChickenLib:${config.version.minecraft}-${config.version.cclib}:dev"
compile "codechicken:ForgeMultipart:${config.version.minecraft}-${config.version.fmp}:dev" compile "codechicken:ForgeMultipart:${config.version.minecraft}-${config.version.fmp}:dev"
compile "codechicken:CodeChickenCore:${config.version.minecraft}-${config.version.cccore}:dev" compile "codechicken:CodeChickenCore:${config.version.minecraft}-${config.version.cccore}:dev"
compile "codechicken:NotEnoughItems:${config.version.minecraft}-${config.version.nei}:dev" compile "codechicken:NotEnoughItems:${config.version.minecraft}-${config.version.nei}:dev"
compile "resonant:Universal-Electricity:3.1.0:core"
compile "resonant:Resonant-Engine:1.2.0:core"
} }
jar { jar {
classifier = project.name classifier = project.name
dependsOn ":copyBuildXml" dependsOn ":copyBuildXml"
destinationDir = file (rootProject.getRootDir().getPath() + '/output') destinationDir = file (rootProject.getRootDir().getPath() + '/output')
} }
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
@ -98,14 +100,14 @@ allprojects {
} }
} }
} }
subprojects { subprojects {
archivesBaseName = "${System.getenv().JOB_NAME}" archivesBaseName = "${System.getenv().JOB_NAME}"
sourceSets.main.compileClasspath += rootProject.sourceSets.api.output sourceSets.main.compileClasspath += rootProject.sourceSets.api.output
dependencies { dependencies {
compile rootProject compile rootProject
} }
rootProject.tasks.reobf { rootProject.tasks.reobf {
reobf(tasks.jar) { spec -> reobf(tasks.jar) { spec ->
spec.classpath = sourceSets.main.compileClasspath spec.classpath = sourceSets.main.compileClasspath
@ -116,19 +118,19 @@ subprojects {
processResources { processResources {
from 'build.properties' from 'build.properties'
} }
task copyBuildXml(type: Copy) { task copyBuildXml(type: Copy) {
from 'build.properties' from 'build.properties'
into 'output' into 'output'
} }
task apiZip(type: Zip) { task apiZip(type: Zip) {
classifier = 'api' classifier = 'api'
from sourceSets*.allSource from sourceSets*.allSource
include 'resonantinduction/api/**' include 'resonantinduction/api/**'
destinationDir = file 'output' destinationDir = file 'output'
} }
artifacts { artifacts {
archives apiZip archives apiZip
} }

View file

@ -4,7 +4,7 @@ version.minecraft=1.6.4
version.forge=9.11.1.964 version.forge=9.11.1.964
version.universalelectricity=3.1.+ version.universalelectricity=3.1.+
version.resonantengine=1.2.+ version.resonantengine=1.2.+
version.cclib=1.0.0.61 version.cclib=1.0.0.62
version.cccore=0.9.0.9 version.cccore=0.9.0.9
version.fmp=1.0.0.244 version.fmp=1.0.0.244
version.nei=1.6.1.9 version.nei=1.6.1.9

View file

@ -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=http\://services.gradle.org/distributions/gradle-1.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

Binary file not shown.

View file

@ -1,2 +1,2 @@
rootProject.name = 'Resonant-Induction Core' rootProject.name = 'Resonant-Induction-Core'
include 'archaic', 'mechanical', 'electrical', 'atomic' include 'archaic', 'mechanical', 'electrical', 'atomic'