Skip to content

Commit

Permalink
Update build with POM exclusions for older builds and maven repo switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mumfrey committed Jan 10, 2020
1 parent bd40767 commit c338f0c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
37 changes: 32 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ dependencies {
def guava = 'com.google.guava:guava:21.0' // from mc1.12 onwards
def log4j2 = 'org.apache.logging.log4j:log4j-core:2.0-beta9'

implementation guava
implementation log4j2
compile guava
compile log4j2
compile 'com.google.code.gson:gson:2.2.4'
if (Float.parseFloat(asmVersion) < 6) {
compile "org.ow2.asm:asm-debug-all:$asmVersion"
Expand Down Expand Up @@ -357,15 +357,28 @@ artifacts {
archives javadocJar
}

ext.excludePomDeps = [
'asm-tree',
'asm-commons',
'asm-util',
'log4j-core',
'guava',
'gson',
]

uploadArchives {
repositories {

mavenDeployer {
configuration = configurations.deployerJars

if (project.hasProperty("spongeRepo")) {
repository(url: project.spongeRepo) {
authentication(userName: project.spongeUsername, password: project.spongePassword)
if (buildType == 'RELEASE' && project.hasProperty("releaseRepo")) {
repository(url: project.releaseRepo) {
authentication(userName: project.releaseRepoUsername, password: project.releaseRepoPassword)
}
} else if (buildType == 'SNAPSHOT' && project.hasProperty("snapshotRepo")) {
repository(url: project.snapshotRepo) {
authentication(userName: project.snapshotRepoUsername, password: project.snapshotRepoPassword)
}
}

Expand Down Expand Up @@ -398,7 +411,21 @@ uploadArchives {
}
}
}
whenConfigured {
dependencies = dependencies.findAll {
!it.artifactId.matches(excludePomDeps.join('|'))
}
}
}
}
}
}

install.repositories.mavenInstaller.pom {
whenConfigured {
dependencies = dependencies.findAll {
!it.artifactId.matches(excludePomDeps.join('|'))
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ int getMixinCount() {
/**
* Get the list of mixin classes we will be applying
*/
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
public List<String> getClasses() {
Builder<String> list = ImmutableList.<String>builder();
for (List<String> classes : new List[] { this.mixinClasses, this.mixinClassesClient, this.mixinClassesServer} ) {
Expand Down

0 comments on commit c338f0c

Please sign in to comment.