162 lines
5.7 KiB
Groovy
162 lines
5.7 KiB
Groovy
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
mavenCentral()
|
|
mavenLocal()
|
|
maven { url = "https://maven.minecraftforge.net/" }
|
|
}
|
|
dependencies {
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
name = "JEI"
|
|
url "http://dvs1.progwml6.com/files/maven"
|
|
}
|
|
maven { // HWYLA
|
|
name "TehNuts WAILA fork"
|
|
url "http://tehnut.info/maven"
|
|
}
|
|
maven { // OpenComputers
|
|
name "OpenComputers"
|
|
url "http://maven.cil.li/"
|
|
}
|
|
repositories {//Curseforge maven, in case some other maven goes offline
|
|
maven {
|
|
name = "CurseForge"
|
|
url = "https://minecraft.curseforge.com/api/maven/"
|
|
}
|
|
}
|
|
/*maven { //IC2
|
|
name = "ic2"
|
|
url = "http://maven.ic2.player.to/"
|
|
}*/
|
|
maven {
|
|
name = "CoFH Maven"
|
|
url = "http://maven.covers1624.net"
|
|
}
|
|
}
|
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'maven-publish'
|
|
|
|
ext.buildNumber = "0"
|
|
if (System.getenv("BUILD_NUMBER") != null) {
|
|
buildNumber = System.getenv("BUILD_NUMBER")
|
|
|
|
}
|
|
|
|
version = "$baseVersion.$buildNumber"
|
|
group = "fr.jackcartersmith.orbsat"
|
|
archivesBaseName = "OrbitalSatellite-$project.minecraftVersion"
|
|
|
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
|
compileJava {
|
|
sourceCompatibility = targetCompatibility = '1.8'
|
|
}
|
|
|
|
minecraft {
|
|
// The mappings can be changed at any time, and must be in the following format.
|
|
// snapshot_YYYYMMDD Snapshot are built nightly.
|
|
// stable_# Stables are built at the discretion of the MCP team.
|
|
// Use non-default mappings at your own risk. they may not always work.
|
|
// Simply re-run your setup task after changing the mappings to update your workspace.
|
|
//mappings channel: 'snapshot', version: '20171003-1.12'
|
|
mappings channel: 'stable', version: '39-1.12'
|
|
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
|
|
|
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
|
|
// Default run configurations.
|
|
// These can be tweaked, removed, or duplicated as needed.
|
|
runs {
|
|
client {
|
|
workingDirectory project.file('run')
|
|
|
|
// Recommended logging data for a userdev environment
|
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
|
|
// Recommended logging level for the console
|
|
property 'forge.logging.console.level', 'debug'
|
|
}
|
|
|
|
server {
|
|
workingDirectory project.file('run')
|
|
|
|
// Recommended logging data for a userdev environment
|
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
|
|
// Recommended logging level for the console
|
|
property 'forge.logging.console.level', 'debug'
|
|
}
|
|
}
|
|
}
|
|
|
|
// Include resources generated by data generators.
|
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
|
|
|
dependencies {
|
|
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
|
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
|
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
|
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'
|
|
|
|
implementation "mezz.jei:jei_1.12.2:4.10.+"
|
|
implementation fg.deobf("cofh:RedstoneFlux:1.12-2.1.1.1")
|
|
implementation "li.cil.oc:OpenComputers:MC1.12.2-1.8.+"
|
|
implementation "mcp.mobius.waila:Hwyla:1.8.26-B41_1.12.2"
|
|
//compileOnly 'industrial-craft:industrialcraft-2:release:ex112'//'net.industrial-craft:industrialcraft-2:2.8.+'
|
|
//compileOnly 'baubles:Baubles:1.12:1.5.2' // old dependencies management
|
|
//minecraftLibrary 'baubles:Baubles:1.12:1.5.2'
|
|
}
|
|
|
|
// Example for how to get properties into the manifest for reading by the runtime..
|
|
jar {
|
|
manifest {
|
|
attributes([
|
|
"Specification-Title": "examplemod",
|
|
"Specification-Vendor": "examplemodsareus",
|
|
"Specification-Version": "1", // We are version 1 of ourselves
|
|
"Implementation-Title": project.name,
|
|
"Implementation-Version": "${version}",
|
|
"Implementation-Vendor" :"examplemodsareus",
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
|
])
|
|
}
|
|
}
|
|
|
|
// Example configuration to allow publishing using the maven-publish task
|
|
// This is the preferred method to reobfuscate your jar file
|
|
jar.finalizedBy('reobfJar')
|
|
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
|
|
//publish.dependsOn('reobfJar')
|
|
|
|
// workaround for userdev bug
|
|
tasks.create("copyResourceToClasses", Copy.class) {
|
|
tasks.classes.dependsOn(it)
|
|
dependsOn(tasks.processResources)
|
|
onlyIf { gradle.taskGraph.hasTask(tasks.prepareRuns) }
|
|
|
|
into("$buildDir/classes/java/main")
|
|
// if you write @Mod class in kotlin, please use code below
|
|
// into("$buildDir/classes/kotlin/main")
|
|
from(tasks.processResources.destinationDir)
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifact jar
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
url "file:///${project.projectDir}/mcmodsrepo"
|
|
}
|
|
}
|
|
}
|