-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
90 lines (79 loc) · 2.65 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
buildscript {
ext.kotlin_version = '1.3.21'
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'kotlin'
apply plugin: 'eclipse'
group = 'net.alexwells.roomery'
archivesBaseName = 'Roomery'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = '1.8'
repositories {
maven { url 'https://minecraft.curseforge.com/api/maven/' }
mavenCentral()
}
configurations {
mod
}
dependencies {
minecraft forgeVersion
compile "kottle:Kottle:$kottleVersion"
mod "kottle:Kottle:$kottleVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
minecraft {
mappings channel: mappingsChannel, version: mappingsVersion
runs {
client = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
// console colors
properties 'forge.logging.noansi': 'false'
workingDirectory project.file('run').canonicalPath
source sourceSets.main
}
server = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
// console colors
properties 'forge.logging.noansi': 'false'
workingDirectory project.file('run').canonicalPath
source sourceSets.main
}
}
}
task installMods(type: Copy, dependsOn: "deinstallMods") {
from { configurations.mod }
include "**/*.jar"
into file("run/mods")
}
task deinstallMods(type: Delete) {
delete fileTree(dir: "run/mods", include: "*.jar")
}
project.afterEvaluate {
project.tasks['prepareRuns'].dependsOn(project.tasks['installMods'])
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}