2016-08-06 14:28:05 +00:00
buildscript {
2019-02-12 19:42:17 +00:00
repositories {
jcenter ( )
mavenCentral ( )
maven { url 'https://files.minecraftforge.net/maven' }
}
dependencies {
classpath group: 'net.minecraftforge.gradle' , name: 'ForgeGradle' , version: '3.+' , changing: true
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
2016-08-06 14:28:05 +00:00
}
plugins {
2019-02-12 19:21:46 +00:00
id "maven"
id "com.github.johnrengelman.shadow" version "4.0.4"
2016-08-06 14:28:05 +00:00
}
2019-02-12 19:21:46 +00:00
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'kotlin'
apply plugin: 'eclipse'
apply from: 'https://github.com/shadowfacts/maven/raw/master/maven.gradle'
2016-08-06 14:28:05 +00:00
2016-08-06 14:46:57 +00:00
version = mod_version
2016-08-06 14:28:05 +00:00
2019-02-12 19:21:46 +00:00
sourceCompatibility = targetCompatibility = compileJava . sourceCompatibility = compileJava . targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileKotlin . kotlinOptions . jvmTarget = compileTestKotlin . kotlinOptions . jvmTarget = '1.8'
2016-08-06 14:28:05 +00:00
minecraft {
2019-02-12 19:42:17 +00:00
mappings channel: mappings_channel , version: mappings_version
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'
2019-02-12 19:21:46 +00:00
// enable console colors
properties 'forge.logging.noansi' : 'false'
2019-02-12 19:42:17 +00:00
workingDirectory project . file ( 'run' ) . canonicalPath
source sourceSets . main
}
2016-08-06 14:28:05 +00:00
2019-02-12 19:42:17 +00:00
// todo https://github.com/MinecraftForge/ForgeGradle/pull/546
/ * testClient = {
workingDirectory project . file ( 'run' ) . canonicalPath
2019-02-12 19:21:46 +00:00
2019-02-12 19:42:17 +00:00
source sourceSets . main
source sourceSets . test
2019-02-12 19:21:46 +00:00
2019-02-12 19:42:17 +00:00
merge 'client'
} * /
2019-02-12 19:21:46 +00:00
2019-02-12 19:42:17 +00:00
server = {
// 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'
2019-02-12 19:21:46 +00:00
// enable console colors
properties 'forge.logging.noansi' : 'false'
2019-02-12 19:42:17 +00:00
workingDirectory project . file ( 'run' ) . canonicalPath
source sourceSets . main
}
}
2016-08-06 14:28:05 +00:00
}
2019-02-13 13:33:54 +00:00
jar {
manifest {
attributes ( [ "Specification-Title" : "Mod Language Provider" ,
"Specification-Vendor" : "Forge Development LLC" ,
"Specification-Version" : "1" ,
"Implementation-Title" : project . name ,
"Implementation-Version" : "${version}" ,
"Implementation-Vendor" : "forgelin" ,
"Implementation-Timestamp" : new Date ( ) . format ( "yyyy-MM-dd'T'HH:mm:ssZ" ) ] ,
'net/shadowfacts/forgelin/' )
}
}
2016-08-06 14:28:05 +00:00
repositories {
2019-02-12 19:42:17 +00:00
jcenter ( )
2016-08-06 14:28:05 +00:00
}
dependencies {
2019-02-12 19:42:17 +00:00
minecraft forge_version
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "org.jetbrains:annotations:$annotations_version"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutines_version"
2017-02-16 23:22:08 +00:00
}
2016-08-06 14:28:05 +00:00
shadowJar {
2019-02-12 19:42:17 +00:00
classifier = ""
dependencies {
include ( dependency ( "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" ) )
include ( dependency ( "org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}" ) )
include ( dependency ( "org.jetbrains:annotations:${annotations_version}" ) )
include ( dependency ( "org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutines_version}" ) )
include ( dependency ( "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutines_version}" ) )
}
2016-08-06 14:28:05 +00:00
}
2019-02-12 19:21:46 +00:00
2016-08-06 14:28:05 +00:00
tasks . build . dependsOn shadowJar
artifacts {
2019-02-12 19:42:17 +00:00
archives shadowJar
2016-09-22 22:13:04 +00:00
}
2019-02-12 19:21:46 +00:00
/ * reobf {
2016-09-22 22:13:04 +00:00
shadowJar {
mappingType = "SEARGE"
}
2019-02-12 19:21:46 +00:00
} * /
//tasks.reobfShadowJar.mustRunAfter shadowJar
//tasks.build.dependsOn reobfShadowJar
2017-06-29 20:39:47 +00:00
2017-11-30 18:31:14 +00:00