Commit dc3c3c7b191d0152e1cb4034eaebfe93b0964957
1 parent
71ed1122
Update build to generate correct POM for release, exclude launchwrapper
Showing
1 changed file
with
32 additions
and
7 deletions
build.gradle
| @@ -299,9 +299,20 @@ uploadArchives { | @@ -299,9 +299,20 @@ uploadArchives { | ||
| 299 | url 'http://develop.liteloader.com/liteloader/LiteLoader/issues' | 299 | url 'http://develop.liteloader.com/liteloader/LiteLoader/issues' |
| 300 | } | 300 | } |
| 301 | } | 301 | } |
| 302 | - whenConfigured { | ||
| 303 | - dependencies = dependencies.findAll { | ||
| 304 | - !it.artifactId.contains('mixin') | 302 | + if (!project.isReleaseBuild) { |
| 303 | + whenConfigured { | ||
| 304 | + dependencies = dependencies.findAll { | ||
| 305 | + !it.artifactId.contains('mixin') | ||
| 306 | + } | ||
| 307 | + } | ||
| 308 | + } else { | ||
| 309 | + whenConfigured { | ||
| 310 | + withXml { | ||
| 311 | + def xmlDeps = asNode().get('dependencies').get(0).children().get(0) | ||
| 312 | + def exclusion = xmlDeps.appendNode('exclusions').appendNode('exclusion') | ||
| 313 | + exclusion.appendNode('groupId', 'net.minecraft') | ||
| 314 | + exclusion.appendNode('artifactId', 'launchwrapper') | ||
| 315 | + } | ||
| 305 | } | 316 | } |
| 306 | } | 317 | } |
| 307 | } | 318 | } |
| @@ -309,10 +320,24 @@ uploadArchives { | @@ -309,10 +320,24 @@ uploadArchives { | ||
| 309 | } | 320 | } |
| 310 | } | 321 | } |
| 311 | 322 | ||
| 312 | -install.repositories.mavenInstaller.pom { | ||
| 313 | - whenConfigured { | ||
| 314 | - dependencies = dependencies.findAll { | ||
| 315 | - !it.artifactId.contains('mixin') | 323 | +if (!project.isReleaseBuild) { |
| 324 | + install.repositories.mavenInstaller.pom { | ||
| 325 | + whenConfigured { | ||
| 326 | + dependencies = dependencies.findAll { | ||
| 327 | + !it.artifactId.contains('mixin') | ||
| 328 | + } | ||
| 329 | + } | ||
| 330 | + } | ||
| 331 | +} else { | ||
| 332 | + install.repositories.mavenInstaller.pom { | ||
| 333 | + whenConfigured { | ||
| 334 | + withXml { | ||
| 335 | + def xmlDeps = asNode().get('dependencies').get(0).children().get(0) | ||
| 336 | + def exclusion = xmlDeps.appendNode('exclusions').appendNode('exclusion') | ||
| 337 | + exclusion.appendNode('groupId', 'net.minecraft') | ||
| 338 | + exclusion.appendNode('artifactId', 'launchwrapper') | ||
| 339 | + } | ||
| 316 | } | 340 | } |
| 317 | } | 341 | } |
| 318 | } | 342 | } |
| 343 | + |