mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-08 14:50:51 -04:00
cleaning up gradle scripts a little, adding maven repo generation for publishing
This commit is contained in:
parent
bd4df5b61d
commit
8023dd4db6
59
build.gradle
59
build.gradle
@ -14,58 +14,19 @@ buildscript {
|
||||
apply plugin: 'forge'
|
||||
apply plugin: 'scala'
|
||||
|
||||
compileScala {
|
||||
repositories {
|
||||
ivy {
|
||||
name "forge-cb"
|
||||
artifactPattern "http://files.minecraftforge.net/[module]/[module]-dev-[revision].[ext]"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
compile name: 'CodeChickenLib', version: "1.6.4-1.0.0.62", ext: 'jar'
|
||||
compile name: 'ForgeMultipart', version: "1.6.4-1.0.0.250", ext: 'jar'
|
||||
}
|
||||
file "build.properties" withReader {
|
||||
def prop = new Properties()
|
||||
prop.load(it)
|
||||
ext.config = new ConfigSlurper().parse prop
|
||||
}
|
||||
|
||||
version = "1.2.2"
|
||||
group= "li.cil.oc" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "OpenComputers-MC1.6.4"
|
||||
version = "${config.oc.version}"
|
||||
group = "li.cil.oc"
|
||||
archivesBaseName = "OpenComputers-MC${config.minecraft.version}"
|
||||
|
||||
if (System.getenv("BUILD_NUMBER") != null)
|
||||
version += ".${System.getenv("BUILD_NUMBER")}"
|
||||
|
||||
minecraft {
|
||||
version = "1.6.4-9.11.1.964"
|
||||
}
|
||||
|
||||
processResources {
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod/info'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
// because the normal default jar task has been modified to be obfuscated
|
||||
task deobfJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'deobf'
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'api'
|
||||
include 'li/cil/oc/api/**'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives deobfJar
|
||||
archives apiJar
|
||||
}
|
||||
apply from: 'gradle/forge.gradle'
|
||||
apply from: 'gradle/artifact.gradle'
|
||||
apply from: 'gradle/release.gradle'
|
||||
|
6
build.properties
Normal file
6
build.properties
Normal file
@ -0,0 +1,6 @@
|
||||
minecraft.version=1.6.4
|
||||
forge.version=9.11.1.964
|
||||
oc.version=1.2.2
|
||||
ccl.version=1.0.0.62
|
||||
fmp.version=1.0.0.250
|
||||
maven.url=file:///var/www/users/fnuecke/maven.cil.li
|
16
gradle/artifact.gradle
Normal file
16
gradle/artifact.gradle
Normal file
@ -0,0 +1,16 @@
|
||||
// because the normal default jar task has been modified to be obfuscated
|
||||
task deobfJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'deobf'
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'api'
|
||||
include 'li/cil/oc/api/**'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives deobfJar
|
||||
archives apiJar
|
||||
}
|
26
gradle/forge.gradle
Normal file
26
gradle/forge.gradle
Normal file
@ -0,0 +1,26 @@
|
||||
compileScala {
|
||||
repositories {
|
||||
ivy {
|
||||
name "forge-ext"
|
||||
artifactPattern "http://files.minecraftforge.net/[module]/[module]-dev-[revision].[ext]"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
compile name: 'CodeChickenLib', version: "${config.minecraft.version}-${config.ccl.version}", ext: 'jar'
|
||||
compile name: 'ForgeMultipart', version: "${config.minecraft.version}-${config.fmp.version}", ext: 'jar'
|
||||
}
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = "${config.minecraft.version}-${config.forge.version}"
|
||||
}
|
||||
|
||||
processResources {
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod/info'
|
||||
expand 'version':project.version, 'mcversion':config.minecraft.version
|
||||
}
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
16
gradle/release.gradle
Normal file
16
gradle/release.gradle
Normal file
@ -0,0 +1,16 @@
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
version "MC${minecraft.version}-${project.version}"
|
||||
artifact apiJar
|
||||
artifact deobfJar
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "${config.maven.url}"
|
||||
}
|
||||
}
|
||||
}
|
1
settings.gradle
Normal file
1
settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
rootProject.name = "OpenComputers"
|
Loading…
x
Reference in New Issue
Block a user