Skip to content

Commit

Permalink
Compile Side(Only) classes to Java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Johni0702 committed Jun 4, 2021
1 parent 865cfbf commit af45ba7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ repositories {
maven { url = "https://jitpack.io" } // updated MCInjector
}

// The Side and SideOnly classes are injected into MC, so they must be compiled to Java 8 so Forge does not blow up.
sourceSets {
side
}
tasks.named(sourceSets.side.compileJavaTaskName, JavaCompile.class).configure {
sourceCompatibility '1.8'
targetCompatibility '1.8'
}
jar {
from(sourceSets.side.output)
}
shadowJar {
from(sourceSets.side.output)
}

configurations {
// compile has been replaced with api, re-adding to keep the diff small
compile
Expand All @@ -72,6 +87,8 @@ dependencies {
shadow gradleApi()
testImplementation gradleApi()

shadow sourceSets.side.output

compile 'org.ow2.asm:asm:6.0'
compile 'org.ow2.asm:asm-tree:6.0'
compile 'org.ow2.asm:asm-commons:6.0'
Expand Down

0 comments on commit af45ba7

Please sign in to comment.