Create/build.gradle

157 lines
4.5 KiB
Groovy
Raw Normal View History

buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '5.2.0'
}
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'
Merge remote-tracking branch 'origin/mc1.14-v0.2.3' into mc1.15-v0.2.2 # Conflicts: # build.gradle # src/main/java/com/simibubi/create/foundation/utility/SuperByteBuffer.java # src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java # src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java # src/main/java/com/simibubi/create/modules/contraptions/components/fan/EncasedFanBlock.java # src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java # src/main/java/com/simibubi/create/modules/contraptions/components/turntable/TurntableBlock.java # src/main/java/com/simibubi/create/modules/contraptions/processing/BasinBlock.java # src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverBlock.java # src/main/java/com/simibubi/create/modules/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java # src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java # src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntityRenderer.java # src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockModel.java # src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkBlock.java # src/main/java/com/simibubi/create/modules/logistics/block/StockswitchBlock.java # src/main/java/com/simibubi/create/modules/palettes/CTGlassPaneBlock.java # src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableBlock.java # src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonBlock.java # src/main/resources/META-INF/mods.toml
2020-04-12 21:25:52 +02:00
version = 'mc1.15.2_v0.2.3'
group = 'com.simibubi.create'
archivesBaseName = 'create'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
minecraft {
2020-03-21 20:42:00 +01:00
mappings channel: 'snapshot', version: '20200301-mixed-1.15.2'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'info'
property 'fml.earlyprogresswindow', 'false'
mods {
create {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run/server')
property 'forge.logging.console.level', 'info'
mods {
create {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
property 'fml.earlyprogresswindow', 'false'
args '--mod', 'create', '--client', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources')
mods {
create {
source sourceSets.main
}
}
}
}
}
sourceSets.main.resources {
srcDir 'src/generated/resources'
}
repositories {
maven {
// location of the maven that hosts JEI files
name "Progwml6 maven"
url "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name "ModMaven"
url "https://modmaven.k-4u.nl"
}
maven {
//location of the maven for vazkii's mods
name "blamejared"
url "http://maven.blamejared.com/"
}
maven {
//location of the maven for mixed mappings and registrate
name = "tterrag maven"
url = "https://maven.tterrag.com/"
}
}
configurations {
shade
}
dependencies {
minecraft 'net.minecraftforge:forge:1.15.2-31.1.36'
def registrate = "com.tterrag.registrate:Registrate:MC1.15.2-0.0.3.8"
implementation fg.deobf(registrate)
shade registrate
// compile against the JEI API but do not include it at runtime
2020-03-21 20:42:00 +01:00
compileOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2:api")
// at runtime, use the full JEI jar
2020-03-21 20:42:00 +01:00
runtimeOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2")
// i'll leave this here commented for easier testing
//runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69")
//runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984")
}
jar {
manifest {
attributes([
"Specification-Title": "create",
"Specification-Vendor": "simibubi",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"simibubi",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
shadowJar {
configurations = [project.configurations.shade]
relocate 'com.tterrag.registrate', 'com.simibubi.create.repack.registrate'
}
reobf {
shadowJar {}
}
// Example configuration to allow publishing using the maven-publish task
// we define a custom artifact that is sourced from the reobfJar output task
// and then declare that to be published
// Note you'll need to add a repository here
def reobfFile = file("$buildDir/reobfJar/output.jar")
def reobfArtifact = artifacts.add('default', reobfFile) {
type 'jar'
builtBy 'reobfJar'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact reobfArtifact
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}