android:gradle
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| android:gradle [2013/07/29 22:50] – [What's Groovy] percy | android:gradle [2016/05/05 13:07] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Android Gradle ====== | ====== Android Gradle ====== | ||
| + | Briefly, | ||
| + | And the Gradle script is written with Groovy([[wp> | ||
| + | |||
| + | Also it will provide a flexible way for customization, | ||
| + | |||
| + | Anyway,I hope it will be continuely improved, | ||
| ===== What's Gradle ===== | ===== What's Gradle ===== | ||
| Line 121: | Line 127: | ||
| </ | </ | ||
| ===== Gradle build script example ===== | ===== Gradle build script example ===== | ||
| + | <file Groovy build.grade> | ||
| + | buildscript { | ||
| + | repositories { | ||
| + | mavenCentral() | ||
| + | } | ||
| + | dependencies { | ||
| + |         classpath ' | ||
| + | } | ||
| + | } | ||
| + | |||
| + | apply plugin: ' | ||
| + | |||
| + | dependencies { | ||
| + |     compile files(' | ||
| + |      ' | ||
| + |      ' | ||
| + |      ' | ||
| + |      ' | ||
| + |      ' | ||
| + |      ' | ||
| + | ) | ||
| + | } | ||
| + | |||
| + | android { | ||
| + | compileSdkVersion 17 | ||
| + |     buildToolsVersion " | ||
| + | |||
| + | |||
| + | defaultConfig { | ||
| + | minSdkVersion 8 | ||
| + | targetSdkVersion 17 | ||
| + | } | ||
| + | |||
| + | sourceSets { | ||
| + | main { | ||
| + |             manifest.srcFile ' | ||
| + |             java.srcDirs = [' | ||
| + |             resources.srcDirs = [' | ||
| + |             aidl.srcDirs = [' | ||
| + |             renderscript.srcDirs = [' | ||
| + |             res.srcDirs = [' | ||
| + |             assets.srcDirs = [' | ||
| + | } | ||
| + | |||
| + |         instrumentTest.setRoot(' | ||
| + | } | ||
| + | |||
| + | signingConfigs { | ||
| + | debug { | ||
| + |             storeFile file(" | ||
| + | } | ||
| + | |||
| + | releaseConfig{ | ||
| + |             storeFile file(" | ||
| + |             storePassword " | ||
| + |             keyAlias " | ||
| + |             keyPassword " | ||
| + | } | ||
| + | } | ||
| + | |||
| + | buildTypes { | ||
| + | release { | ||
| + | runProguard true | ||
| + |             proguardFile getDefaultProguardFile(' | ||
| + | signingConfig signingConfigs.releaseConfig | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ====Basic Usage ==== | ||
| + | gradle assemble | ||
/var/www/dokuwiki/wiki/data/attic/android/gradle.1375109436.txt.gz · Last modified: 2016/05/05 13:06 (external edit)
                
                