Clean up the jar naming

The previous naming was interfering with 'gr install' installing the
artifacts locally.
This commit is contained in:
Ben Gruver 2016-02-14 18:45:17 -08:00
parent 4b337cc04d
commit 6429b3daa9
3 changed files with 9 additions and 22 deletions

View File

@ -51,16 +51,13 @@ dependencies {
processResources.inputs.property('version', version)
processResources.expand('version': version)
// This is the jar that gets uploaded to maven
jar {
baseName = 'maven'
}
// Build a separate jar that contains all dependencies
task fatJar(type: Jar) {
from sourceSets.main.output
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
classifier = 'fat'
manifest {
attributes('Main-Class': 'org.jf.baksmali.main')
}

View File

@ -33,8 +33,6 @@ apply plugin: 'idea'
version = '2.1.2'
def jarVersion = version
if (!('release' in gradle.startParameter.taskNames)) {
def versionSuffix
try {
@ -51,12 +49,7 @@ if (!('release' in gradle.startParameter.taskNames)) {
versionSuffix = 'dev'
}
def baseVersion = version
version = baseVersion + '-' + versionSuffix
// use something like module-1.2.3-dev.jar for the jar name, rather than the full
// module-1.2.3-001afe02-dirty.jar
jarVersion = baseVersion + '-dev'
version += "-${versionSuffix}"
} else {
if (System.env.JDK6_HOME == null && !JavaVersion.current().isJava6()) {
throw new InvalidUserDataException("bzzzzzzzt. Release builds must be performed with java 6. " +
@ -69,6 +62,10 @@ if (!('release' in gradle.startParameter.taskNames)) {
task release() {
}
task(install) << {
println "Installing version: ${version}"
}
// The projects that get pushed to maven
def maven_release_projects = ['smali', 'baksmali', 'dexlib2', 'util']
@ -114,10 +111,6 @@ subprojects {
]
}
jar {
version = jarVersion
}
repositories {
mavenCentral()
}

View File

@ -92,16 +92,13 @@ dependencies {
processResources.inputs.property('version', version)
processResources.expand('version': version)
// This is the jar that gets uploaded to maven
jar {
baseName = 'maven'
}
// Build a separate jar that contains all dependencies
task fatJar(type: Jar, dependsOn: jar) {
from sourceSets.main.output
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
classifier = 'fat'
manifest {
attributes('Main-Class': 'org.jf.smali.main')
}