Fix GSON dependency configuration for FG3
This commit is contained in:
@@ -125,7 +125,7 @@ minecraft {
|
|||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
if (mcVersion >= 11300) {
|
if (mcVersion >= 11300) {
|
||||||
// FIXME
|
// No longer required in 1.13+ because all version info is in the toml file
|
||||||
} else {
|
} else {
|
||||||
// Note cannot use minecraft.replace because that has already been forwarded to the task by FG by now
|
// Note cannot use minecraft.replace because that has already been forwarded to the task by FG by now
|
||||||
tasks.sourceMainJava.replace '@MOD_VERSION@', project.version
|
tasks.sourceMainJava.replace '@MOD_VERSION@', project.version
|
||||||
@@ -147,8 +147,14 @@ repositories {
|
|||||||
configurations {
|
configurations {
|
||||||
shade
|
shade
|
||||||
compile.extendsFrom shade
|
compile.extendsFrom shade
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME seems to be inherited now? shade.exclude group: 'com.google.code.gson', module: 'gson' // provided by MC
|
def shadeExclusions = {
|
||||||
|
// Cannot just add these to the shade configuration because they'd be inherited by the compile configuration then
|
||||||
|
exclude group: 'com.google.guava', module: 'guava-jdk5'
|
||||||
|
exclude group: 'com.google.guava', module: 'guava' // provided by MC
|
||||||
|
exclude group: 'com.google.code.gson', module: 'gson' // provided by MC
|
||||||
|
exclude group: 'org.projectlombok', module: 'lombok' // runtime only for @SneakyThrows which isn't used
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -158,13 +164,6 @@ dependencies {
|
|||||||
][mcVersion]
|
][mcVersion]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FG3) {
|
|
||||||
// FIXME gson should be bundled with MC, not sure why forge doesn't add it (probably related to above shade.exclude)
|
|
||||||
annotationProcessor group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
|
|
||||||
compileOnly group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
|
|
||||||
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
|
|
||||||
}
|
|
||||||
|
|
||||||
// compile 'com.github.SpongePowered:Mixin:404f5da' // 0.7.5-SNAPSHOT
|
// compile 'com.github.SpongePowered:Mixin:404f5da' // 0.7.5-SNAPSHOT
|
||||||
// ^ mixin doesn't compile on jitpack, so we'll have to depend on the SNAPSHOT and build it manually for reprod
|
// ^ mixin doesn't compile on jitpack, so we'll have to depend on the SNAPSHOT and build it manually for reprod
|
||||||
if (!gradle.gradleVersion.startsWith('3.')) {
|
if (!gradle.gradleVersion.startsWith('3.')) {
|
||||||
@@ -174,20 +173,16 @@ dependencies {
|
|||||||
compile 'org.spongepowered:mixin:0.7.8-SNAPSHOT'
|
compile 'org.spongepowered:mixin:0.7.8-SNAPSHOT'
|
||||||
shade 'com.googlecode.mp4parser:isoparser:1.1.7'
|
shade 'com.googlecode.mp4parser:isoparser:1.1.7'
|
||||||
shade 'org.apache.commons:commons-exec:1.3'
|
shade 'org.apache.commons:commons-exec:1.3'
|
||||||
def withoutGuava = { exclude group: 'com.google.guava', module: 'guava-jdk5' }
|
shade 'com.google.apis:google-api-services-youtube:v3-rev178-1.22.0', shadeExclusions
|
||||||
shade 'com.google.apis:google-api-services-youtube:v3-rev178-1.22.0', withoutGuava
|
shade 'com.google.api-client:google-api-client-gson:1.20.0', shadeExclusions
|
||||||
shade 'com.google.api-client:google-api-client-gson:1.20.0', withoutGuava
|
shade 'com.google.api-client:google-api-client-java6:1.20.0', shadeExclusions
|
||||||
shade 'com.google.api-client:google-api-client-java6:1.20.0', withoutGuava
|
|
||||||
shade 'com.google.oauth-client:google-oauth-client-jetty:1.20.0'
|
shade 'com.google.oauth-client:google-oauth-client-jetty:1.20.0'
|
||||||
|
|
||||||
shade 'org.aspectj:aspectjrt:1.8.2'
|
shade 'org.aspectj:aspectjrt:1.8.2'
|
||||||
|
|
||||||
def studioVersion = mcVersionStr
|
def studioVersion = mcVersionStr
|
||||||
if (studioVersion == '1.8.9') studioVersion = '1.8'
|
if (studioVersion == '1.8.9') studioVersion = '1.8'
|
||||||
shade("com.replaymod.replaystudio:$studioVersion:9e362ef"){ // FIXME
|
shade "com.replaymod.replaystudio:$studioVersion:9e362ef", shadeExclusions // FIXME
|
||||||
exclude group: 'com.google.guava', module: 'guava' // provided by MC
|
|
||||||
exclude group: 'org.projectlombok', module: 'lombok' // runtime only for @SneakyThrows which isn't used
|
|
||||||
}
|
|
||||||
|
|
||||||
def jGuiVersion = project.name
|
def jGuiVersion = project.name
|
||||||
if (['1.10.2', '1.11', '1.11.2'].contains(jGuiVersion)) jGuiVersion = '1.9.4'
|
if (['1.10.2', '1.11', '1.11.2'].contains(jGuiVersion)) jGuiVersion = '1.9.4'
|
||||||
|
|||||||
Reference in New Issue
Block a user