Commit 9a84f6e4ee691dd5c72043113a9c2d392f435350

Authored by Mumfrey
1 parent 19528da0

Update build to generate correct POM for release, exclude launchwrapper

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