Skip to content

Commit

Permalink
Improve kotlin compiler (exclude from java modules)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravis96 committed Jul 3, 2023
1 parent edefbf6 commit 342b979
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
8 changes: 0 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id 'java'
id 'idea'
id 'checkstyle'
id 'maven-publish'
id "org.jetbrains.kotlin.jvm" version "1.8.22"
}

allprojects {
group 'cc.dreamcode.platform'
version '1.9-pre.14'

apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'checkstyle'
apply plugin: 'maven-publish'

Expand Down Expand Up @@ -42,10 +38,6 @@ allprojects {
}

subprojects {
tasks.withType(KotlinCompile).configureEach {
kotlinOptions.jvmTarget = "1.8"
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

Expand Down
10 changes: 10 additions & 0 deletions core-kt/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id "org.jetbrains.kotlin.jvm" version "1.8.22"
}

repositories {
maven { url "https://repo.codemc.io/repository/nms" }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
Expand All @@ -17,4 +23,8 @@ dependencies {

// -- dream-utilities --
implementation "cc.dreamcode:utilities:1.2.14"
}

tasks.withType(KotlinCompile).configureEach {
kotlinOptions.jvmTarget = "1.8"
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ fun <T : Any> DeserializationData.getAsList(key: String, valueType: KClass<T>):

fun <T: Any> Injector.get(name: String, type: KClass<T>): Optional<T> = this.get(name, type.java)

fun <T : Any> DreamPlatform.createInstance(type: KClass<T>): T = this.createInstance(type.java)
fun <T : Any> DreamPlatform.createInstance(type: KClass<T>): T = this.createInstance(type.java)

0 comments on commit 342b979

Please sign in to comment.