schujk
2013-10-14 20:02:59 UTC
Not sure what I am doing incorrectly...I've included a jar task but the final
jar file is missing a significant amount of compiled classes that are in
.../build/classes/debug/...
build.gradle below:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
dependencies{
compile fileTree(dir: 'libs', include: '*.jar')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 17
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
signingConfigs {
release
}
buildTypes {
debug {
packageNameSuffix ".debug"
versionNameSuffix "-debug"
}
release {
packageNameSuffix ".release"
versionNameSuffix = "-release"
signingConfig signingConfigs.release
runProguard true
proguardFile getDefaultProguardFile('proguard-android.txt')
}
}
}
task jar(type: Jar) {
appendix = "fat"
from android.sourceSets.main.java
from { configurations.compile.collect { it.isDirectory() ? it :
zipTree(it) } }
}
--
View this message in context: http://gradle.1045684.n5.nabble.com/fatjar-task-for-android-project-tp5711941.html
Sent from the gradle-user mailing list archive at Nabble.com.
jar file is missing a significant amount of compiled classes that are in
.../build/classes/debug/...
build.gradle below:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
dependencies{
compile fileTree(dir: 'libs', include: '*.jar')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 17
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
signingConfigs {
release
}
buildTypes {
debug {
packageNameSuffix ".debug"
versionNameSuffix "-debug"
}
release {
packageNameSuffix ".release"
versionNameSuffix = "-release"
signingConfig signingConfigs.release
runProguard true
proguardFile getDefaultProguardFile('proguard-android.txt')
}
}
}
task jar(type: Jar) {
appendix = "fat"
from android.sourceSets.main.java
from { configurations.compile.collect { it.isDirectory() ? it :
zipTree(it) } }
}
--
View this message in context: http://gradle.1045684.n5.nabble.com/fatjar-task-for-android-project-tp5711941.html
Sent from the gradle-user mailing list archive at Nabble.com.