aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorthedarkcolour <30441001+thedarkcolour@users.noreply.github.com>2020-10-18 12:21:34 -0700
committerthedarkcolour <30441001+thedarkcolour@users.noreply.github.com>2020-10-18 12:21:34 -0700
commit1d4d9787edfea95c3aa23babf1643ce901afa7ac (patch)
tree933a1876acb75d1351788aee2eca5d1063ba1622 /build.gradle
parente69c00673a0f6bc180d646665fc4973874f13ab8 (diff)
downloadKotlinForForge-1d4d9787edfea95c3aa23babf1643ce901afa7ac.tar.gz
KotlinForForge-1d4d9787edfea95c3aa23babf1643ce901afa7ac.tar.bz2
KotlinForForge-1d4d9787edfea95c3aa23babf1643ce901afa7ac.zip
Close #8
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle68
1 files changed, 30 insertions, 38 deletions
diff --git a/build.gradle b/build.gradle
index ccff79b..68328d6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,7 +22,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
-version = "1.6.1"
+version = "1.6.2"
group = 'thedarkcolour.kotlinforforge'
archivesBaseName = 'kotlinforforge'
@@ -31,38 +31,6 @@ sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = co
tasks.build.dependsOn kotlinSourcesJar
tasks.build.dependsOn shadowJar
-minecraft {
- mappings channel: 'snapshot', version: '20200723-1.16.1'
-
- runs {
- client {
- workingDirectory project.file('run')
-
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
-
- property 'forge.logging.console.level', 'debug'
- }
-
- server {
- workingDirectory project.file('run/server')
-
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
-
- property 'forge.logging.console.level', 'debug'
- }
-
- data {
- workingDirectory project.file('run')
-
- property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
-
- property 'forge.logging.console.level', 'debug'
-
- args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
- }
- }
-}
-
repositories {
mavenCentral()
maven {
@@ -91,7 +59,25 @@ dependencies {
compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-jdk8", version: coroutines_version
// Tests
- testImplementation 'junit:junit:4.11'
+ implementation 'junit:junit:4.11'
+}
+
+minecraft {
+ mappings channel: 'snapshot', version: '20200723-1.16.1'
+
+ runs {
+ client {
+ workingDirectory project.file('run')
+
+ property 'forge.logging.console.level', 'debug'
+ }
+
+ server {
+ workingDirectory project.file('run/server')
+
+ property 'forge.logging.console.level', 'debug'
+ }
+ }
}
shadowJar {
@@ -122,11 +108,17 @@ jar {
}
}
+static def options(kotlinOptions) {
+ kotlinOptions.jvmTarget = '1.8'
+ kotlinOptions.freeCompilerArgs = ["-Xexplicit-api=warning"]
+}
+
compileKotlin {
- kotlinOptions {
- jvmTarget = '1.8'
- freeCompilerArgs = ["-Xexplicit-api=warning"]
- }
+ options(kotlinOptions)
+}
+
+compileTestKotlin {
+ options(kotlinOptions)
}
kotlinSourcesJar {