Updated gradle config for ForgeGradle 3.0
This commit is contained in:
parent
2cc508fd38
commit
fe0aff0a37
106
build.gradle
106
build.gradle
|
@ -1,53 +1,66 @@
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
maven {
|
mavenCentral()
|
||||||
name "forge"
|
maven { url 'https://files.minecraftforge.net/maven' }
|
||||||
url "http://files.minecraftforge.net/maven/"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "maven"
|
id "maven"
|
||||||
id "com.github.johnrengelman.shadow" version "1.2.3"
|
id "com.github.johnrengelman.shadow" version "4.0.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: "kotlin"
|
apply plugin: 'net.minecraftforge.gradle'
|
||||||
apply plugin: "net.minecraftforge.gradle.forge"
|
apply plugin: 'kotlin'
|
||||||
apply from: "https://github.com/shadowfacts/maven/raw/master/maven.gradle"
|
apply plugin: 'eclipse'
|
||||||
|
|
||||||
|
apply from: 'https://github.com/shadowfacts/maven/raw/master/maven.gradle'
|
||||||
|
|
||||||
version = mod_version
|
version = mod_version
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = '1.8'
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version = mc_version + "-" + forge_version
|
mappings channel: mappings_channel, version: mappings_version
|
||||||
runDir = "run"
|
|
||||||
|
|
||||||
mappings = mcp_mappings
|
runs {
|
||||||
|
client = {
|
||||||
|
// recommended logging data for a userdev environment
|
||||||
|
properties 'forge.logging.markers': 'CORE,SCAN,REGISTRIES,REGISTRYDUMP'
|
||||||
|
// recommended logging level for the console
|
||||||
|
properties 'forge.logging.console.level': 'debug'
|
||||||
|
// enable console colors
|
||||||
|
properties 'forge.logging.noansi': 'false'
|
||||||
|
workingDirectory project.file('run').canonicalPath
|
||||||
|
source sourceSets.main
|
||||||
|
}
|
||||||
|
|
||||||
replaceIn "Forgelin.kt"
|
// todo https://github.com/MinecraftForge/ForgeGradle/pull/546
|
||||||
replace "@VERSION@", mod_version
|
/*testClient = {
|
||||||
|
workingDirectory project.file('run').canonicalPath
|
||||||
|
|
||||||
useDepAts = true
|
source sourceSets.main
|
||||||
}
|
source sourceSets.test
|
||||||
|
|
||||||
processResources {
|
merge 'client'
|
||||||
inputs.property "version", project.version
|
}*/
|
||||||
inputs.property "mcversion", project.minecraft.version
|
|
||||||
|
|
||||||
from (sourceSets.main.resources.srcDirs) {
|
server = {
|
||||||
include "mcmod.info"
|
// recommended logging data for a userdev environment
|
||||||
expand "version": project.version, "mcversion": mc_version
|
properties 'forge.logging.markers': 'CORE,SCAN,REGISTRIES,REGISTRYDUMP'
|
||||||
}
|
// recommended logging level for the console
|
||||||
from (sourceSets.main.resources.srcDirs) {
|
properties 'forge.logging.console.level': 'debug'
|
||||||
exclude "mcmod.info"
|
// enable console colors
|
||||||
|
properties 'forge.logging.noansi': 'false'
|
||||||
|
workingDirectory project.file('run').canonicalPath
|
||||||
|
source sourceSets.main
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,23 +69,19 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: kotlin_version
|
minecraft forge_version
|
||||||
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: kotlin_version
|
|
||||||
compile group: "org.jetbrains.kotlin", name: "kotlin-reflect", version: kotlin_version
|
|
||||||
compile group: "org.jetbrains", name: "annotations", version: annotations_version
|
|
||||||
compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-core", version: coroutines_version
|
|
||||||
compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-jdk8", version: coroutines_version
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||||
manifest {
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
attributes "FMLCorePlugin": "net.shadowfacts.forgelin.preloader.ForgelinPlugin",
|
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||||
"FMLCorePluginContainsFMLMod": "true"
|
compile "org.jetbrains:annotations:$annotations_version"
|
||||||
}
|
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
||||||
|
compile "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutines_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
classifier = ""
|
classifier = ""
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
include(dependency("org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"))
|
include(dependency("org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"))
|
||||||
include(dependency("org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"))
|
include(dependency("org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"))
|
||||||
|
@ -80,24 +89,23 @@ shadowJar {
|
||||||
include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutines_version}"))
|
include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutines_version}"))
|
||||||
include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutines_version}"))
|
include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutines_version}"))
|
||||||
}
|
}
|
||||||
manifest {
|
|
||||||
attributes "FMLCorePlugin": "net.shadowfacts.forgelin.preloader.ForgelinPlugin",
|
|
||||||
"FMLCorePluginContainsFMLMod": "true"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.build.dependsOn shadowJar
|
tasks.build.dependsOn shadowJar
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives shadowJar
|
archives shadowJar
|
||||||
}
|
}
|
||||||
|
|
||||||
reobf {
|
/*reobf {
|
||||||
shadowJar {
|
shadowJar {
|
||||||
mappingType = "SEARGE"
|
mappingType = "SEARGE"
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
tasks.reobfShadowJar.mustRunAfter shadowJar
|
|
||||||
tasks.build.dependsOn reobfShadowJar
|
//tasks.reobfShadowJar.mustRunAfter shadowJar
|
||||||
|
//tasks.build.dependsOn reobfShadowJar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
mod_version = 1.8.2
|
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||||
|
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||||
|
org.gradle.jvmargs=-Xmx1G
|
||||||
|
org.gradle.daemon=false
|
||||||
|
|
||||||
|
mod_version = 2.0.0
|
||||||
group = net.shadowfacts
|
group = net.shadowfacts
|
||||||
archivesBaseName = Forgelin
|
archivesBaseName = Forgelin
|
||||||
|
|
||||||
mc_version = 1.12.2
|
mc_version = 1.12.2
|
||||||
mcp_mappings = snapshot_20180609
|
mappings_channel = snapshot
|
||||||
forge_version = 14.23.4.2705
|
mappings_version = 20180921-1.13
|
||||||
|
forge_version = net.minecraftforge.test:forge:1.13-24.0.183-1.13-pre
|
||||||
|
|
||||||
kotlin_version = 1.3.10
|
kotlin_version = 1.3.10
|
||||||
annotations_version = 16.0.3
|
annotations_version = 16.0.3
|
||||||
|
|
Loading…
Reference in New Issue