| plugins { |
| id "net.ltgt.errorprone" version "0.0.13" |
| id "com.github.johnrengelman.shadow" version "2.0.2" |
| id "java" |
| } |
| |
| sourceCompatibility = "1.8" |
| targetCompatibility = "1.8" |
| |
| repositories { |
| mavenCentral() |
| } |
| |
| dependencies { |
| compile deps.build.commonscli |
| compile deps.build.guava |
| compileOnly deps.build.errorProneCheckApi |
| |
| compile project(":jar-infer:jar-infer-lib") |
| |
| errorprone deps.build.errorProneCore |
| |
| testCompile deps.test.junit4 |
| testCompile(deps.build.errorProneTestHelpers) { |
| exclude group: "junit", module: "junit" |
| } |
| } |
| |
| jar { |
| manifest { |
| attributes( |
| 'Main-Class': 'com.uber.nullaway.jarinfer.JarInfer' |
| ) |
| } |
| } |
| |
| shadowJar { |
| mergeServiceFiles() |
| configurations = [project.configurations.compile] |
| classifier = null |
| } |
| shadowJar.dependsOn jar |
| assemble.dependsOn shadowJar |
| |
| apply from: rootProject.file("gradle/gradle-mvn-push.gradle") |
| |
| def configurePomForShadow(pom) { |
| pom.scopeMappings.mappings.remove(project.configurations.compile) |
| pom.scopeMappings.mappings.remove(project.configurations.runtime) |
| pom.scopeMappings.addMapping(MavenPlugin.COMPILE_PRIORITY, project.configurations.shadow, Conf2ScopeMappingContainer.COMPILE) |
| } |
| |
| install { |
| repositories.mavenInstaller { |
| configurePomForShadow(pom) |
| } |
| } |
| install.dependsOn shadowJar |
| |
| uploadArchives { |
| repositories.mavenDeployer { |
| configurePomForShadow(pom) |
| } |
| } |
| uploadArchives.dependsOn shadowJar |
| |