Skip to content

Commit

Permalink
Cleanup and update build.gradle files for modules
Browse files Browse the repository at this point in the history
* Updates plugin names to new versions (previous versions were deprecated and will break soon)
* Update build and compile SDK versions to latest
* Remove unnecessary gradle plugin version and repositories declarations, as these are set via the top-level build.gradle file
* Update target SDK version to latest 21
* Specify min and target SDK versions that match the manifests

Tested the sample and everything still works as normal :)
  • Loading branch information
ZacSweers committed Dec 8, 2014
1 parent c674bc7 commit 96b2073
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 48 deletions.
2 changes: 1 addition & 1 deletion dynamicgrid/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18"/>
android:targetSdkVersion="21"/>

</manifest>
41 changes: 16 additions & 25 deletions dynamicgrid/build.gradle
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:0.13.+'
}
}

apply plugin: 'android-library'

repositories {
mavenCentral()
}
apply plugin: 'com.android.library'

android {
compileSdkVersion 19
buildToolsVersion "19.1"
compileSdkVersion 21
buildToolsVersion "21.1.1"

defaultConfig {
minSdkVersion 8
targetSdkVersion 21
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
2 changes: 1 addition & 1 deletion example/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18"/>
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="21"/>
<application
android:label="@string/app_name"
android:icon="@drawable/ic_launcher">
Expand Down
26 changes: 5 additions & 21 deletions example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:0.13.+'
}
}

apply plugin: 'android'

repositories {
mavenCentral()
}
apply plugin: 'com.android.application'

dependencies {
compile project(':dynamicgrid')
compile 'com.android.support:support-v4:19.+'
}

android {
compileSdkVersion 19
buildToolsVersion "19.1"
compileSdkVersion 21
buildToolsVersion "21.1.1"

sourceSets {
main {
Expand All @@ -32,8 +20,4 @@ android {
assets.srcDirs = ['assets']
}
}

dependencies {
compile project(':dynamicgrid')
}
}

0 comments on commit 96b2073

Please sign in to comment.