forked from SpecialCyCi/AndroidResideMenu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
振理
committed
Aug 8, 2014
1 parent
481b6e6
commit 06ba4f5
Showing
5 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,7 @@ proguard/ | |
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
.gradle/ | ||
build/ | ||
.DS_Store |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apply plugin: 'android-library' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
useOldManifestMerger true | ||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
} | ||
buildTypes { | ||
release { | ||
runProguard false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' | ||
} | ||
} | ||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
java.srcDirs = ['src'] | ||
res.srcDirs = ['res'] | ||
jniLibs.srcDirs = ['libs'] | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
apply plugin: 'android' | ||
|
||
configurations { | ||
provided | ||
compile.exclude module: 'support-v4' //避免preDex时候有多个项目的support-v4.jar依赖进来 | ||
} | ||
|
||
sourceSets { | ||
main { | ||
compileClasspath += configurations.provided | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
compile project(':ResideMenu') | ||
} | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
useOldManifestMerger true | ||
|
||
dexOptions { | ||
jumboMode = true | ||
} | ||
|
||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
} | ||
|
||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
java.srcDirs = ['src'] | ||
res.srcDirs = ['res'] | ||
assets.srcDirs = ['assets'] | ||
aidl.srcDirs = ['src'] | ||
jniLibs.srcDirs = ['libs'] | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
println "-------------------------------------------------" | ||
println "Build ResideMenu with:\n\tbuildToolsVersion = " + System.properties['buildToolsVersion'] | ||
println "\tandroidGradlePluginVersion = " + System.properties['androidGradlePluginVersion'] | ||
println "\tfile.encoding = " + System.properties['file.encoding'] | ||
println "\tCharset.defaultCharset() = " + java.nio.charset.Charset.defaultCharset().toString() | ||
println "-------------------------------------------------\n" | ||
|
||
|
||
//配置extra属性之后,后面的子project需要用到这些属性的地方都直接调用rootProject.ext.XXX,避免修改的时候需要每个project里面都需要去检查、修改 | ||
|
||
ext { | ||
compileSdkVersion = 19 | ||
buildToolsVersion = System.properties['buildToolsVersion'] | ||
minSdkVersion = 9 | ||
targetSdkVersion = 14 | ||
} | ||
|
||
|
||
//每个project构建过程中,都需要依赖gradle构建工具,所以在rootProject里面写一次就好了。 | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:' + System.properties['androidGradlePluginVersion'] | ||
} | ||
} | ||
|
||
allprojects { | ||
|
||
//指定编码类型 | ||
tasks.withType(JavaCompile) { | ||
options.encoding = "UTF-8" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
include ':ResideMenu', ':ResideMenuDemo' | ||
|
||
//override your build tools version in gradle.properties | ||
|
||
if (!System.properties['buildToolsVersion']) { | ||
System.properties['buildToolsVersion'] = "19.1.0" | ||
} | ||
|
||
if (!System.properties['androidGradlePluginVersion']) { | ||
System.properties['androidGradlePluginVersion'] = "0.12.+" | ||
} |