-
-
Save hvisser/fe79ea596d1f4786b6c4 to your computer and use it in GitHub Desktop.
Main build.gradle for a project that has (old versions of) ActionBarSherlock and ViewPagerIndicator included as source. These two projects are configured in the main build file.
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
apply plugin: 'android' | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6+' | |
} | |
} | |
repositories { | |
mavenCentral() | |
} | |
version = "1.0.0" | |
archivesBaseName = "myapp-v${version}" | |
android { | |
compileSdkVersion 19 | |
buildToolsVersion "19.0.0" | |
defaultConfig { | |
targetSdkVersion 19 | |
minSdkVersion 7 | |
versionCode 1 | |
versionName version | |
} | |
// ... other config here... | |
} | |
dependencies { | |
compile 'com.android.support:support-v4:13.+' | |
// these are configured in this build file and in settings.gradle | |
compile project(':ActionBarSherlock') | |
compile project(':ViewPagerIndicator') | |
} | |
project(':ActionBarSherlock') { | |
apply plugin: 'android-library' | |
android { | |
compileSdkVersion 17 | |
buildToolsVersion "19.0.0" | |
defaultConfig { | |
targetSdkVersion 16 | |
} | |
sourceSets { | |
main { | |
manifest.srcFile 'AndroidManifest.xml' | |
java.srcDirs = ['src'] | |
resources.srcDirs = ['src'] | |
aidl.srcDirs = ['src'] | |
renderscript.srcDirs = ['src'] | |
res.srcDirs = ['res'] | |
assets.srcDirs = ['assets'] | |
} | |
instrumentTest.setRoot('tests') | |
} | |
} | |
dependencies { | |
compile 'com.android.support:support-v4:13.+' | |
} | |
} | |
project(':ViewPagerIndicator') { | |
apply plugin: 'android-library' | |
android { | |
compileSdkVersion 17 | |
buildToolsVersion "19.0.0" | |
defaultConfig { | |
targetSdkVersion 16 | |
} | |
sourceSets { | |
main { | |
manifest.srcFile 'AndroidManifest.xml' | |
java.srcDirs = ['src'] | |
resources.srcDirs = ['src'] | |
aidl.srcDirs = ['src'] | |
renderscript.srcDirs = ['src'] | |
res.srcDirs = ['res'] | |
assets.srcDirs = ['assets'] | |
} | |
instrumentTest.setRoot('tests') | |
} | |
} | |
dependencies { | |
compile 'com.android.support:support-v4:13.+' | |
} | |
} |
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
include ':ActionBarSherlock', ':ViewPagerIndicator' | |
// Map the projects given their path on disk. This also solves a problem for me with AS not recognizing the projects | |
// as separate modules, but YMMV. | |
project(":ViewPagerIndicator").projectDir = new File("libraries/ViewPagerIndicator/library") | |
project(":ActionBarSherlock").projectDir = new File("libraries/ActionBarSherlock/library") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment