Created
November 19, 2013 16:36
-
-
Save ariedov/7548279 to your computer and use it in GitHub Desktop.
Gradle android project build config.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6+' | |
} | |
} | |
apply plugin: 'android' | |
dependencies { | |
compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar') | |
compile fileTree(dir: 'libs', include: '*.jar') | |
compile project(":Projectname") | |
} | |
android { | |
buildToolsVersion "17.0" | |
compileSdkVersion 10 | |
sourceSets { | |
main { | |
manifest.srcFile 'AndroidManifest.xml' | |
java.srcDirs = ['src'] | |
resources.srcDirs = ['gen'] | |
res.srcDirs = ['res'] | |
assets.srcDirs = ['assets'] | |
aidl.srcDirs = ['src'] | |
} | |
} | |
signingConfigs { | |
release { | |
storeFile file("your.keystore") | |
storePassword "******" | |
keyAlias "alias" | |
keyPassword "******" | |
} | |
} | |
buildTypes { | |
release { | |
signingConfig signingConfigs.release | |
} | |
} | |
} | |
task nativeLibsToJar(type: Zip, description: 'create a jar archive of the native libs') { | |
destinationDir file("$buildDir/native-libs") | |
baseName 'native-libs' | |
extension 'jar' | |
from fileTree(dir: 'libs', include: '**/*.so') | |
into 'lib/' | |
} | |
tasks.withType(JavaCompile) { | |
compileTask -> compileTask.dependsOn(nativeLibsToJar) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment