Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

Commit

Permalink
Add Gradle build.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed May 20, 2013
1 parent 5cabfa8 commit d1ea971
Show file tree
Hide file tree
Showing 20 changed files with 188 additions and 23 deletions.
20 changes: 11 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
#Android generated
bin
gen

#Eclipse
# Eclipse
.project
.classpath
.settings
.checkstyle

#IntelliJ IDEA
# IntelliJ IDEA
.idea
*.iml
*.ipr
*.iws
classes
gen-external-apklibs

#Maven
# Gradle
.gradle
build

# Maven
target
release.properties
pom.xml.*

#Ant
# Ant
bin
gen
build.xml
ant.properties
local.properties
proguard.cfg
proguard-project.txt

#Other
# Other
.DS_Store
tmp
11 changes: 6 additions & 5 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ ActionBarSherlock Release Process
mvn clean verify

2. Ensure the `CHANGELOG.md` file has up-to-date information and the current date.
3. Pull in the latest translations in the i18n module.
4. Change all of the sample `AndroidManifest.xml` files to the correct version and bump the
3. Update the version number in the root `build.gradle`.
4. Pull in the latest translations in the i18n module.
5. Change all of the sample `AndroidManifest.xml` files to the correct version and bump the
version code arbitrarily.

find actionbarsherlock-samples -name AndroidManifest.xml -exec sed -i '' 's|versionCode="[0-9]*"|versionCode="431"|g' {} \;
find actionbarsherlock-samples -name AndroidManifest.xml -exec sed -i '' 's|versionName="[0-9.]*"|versionName="4.3.1"|g' {} \;

5. Make the release!
6. Make the release!

mvn clean release:clean
mvn release:prepare release:perform

6. Promote the Maven artifact on Sonatype's OSS Nexus install.
7. Deploy the latest website.
7. Promote the Maven artifact on Sonatype's OSS Nexus install.
8. Deploy the latest website.

./deploy_website.sh
7 changes: 7 additions & 0 deletions actionbarsherlock-fest/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apply plugin: 'java'

dependencies {
compile 'com.squareup:fest-android:1.0.4'

runtime project(':actionbarsherlock')
}
2 changes: 2 additions & 0 deletions actionbarsherlock-i18n/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="100" android:versionName="4.2.0" package="com.actionbarsherlock.i18n">
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>
<application/>
</manifest>
18 changes: 18 additions & 0 deletions actionbarsherlock-i18n/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apply plugin: 'android-library'

dependencies {
compile project(':actionbarsherlock')
}

android {
compileSdkVersion 14
buildToolsVersion '17'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
2 changes: 1 addition & 1 deletion actionbarsherlock-samples/demos/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="431" android:versionName="4.3.1" package="com.actionbarsherlock.sample.demos">

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>

<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>

Expand Down
18 changes: 18 additions & 0 deletions actionbarsherlock-samples/demos/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apply plugin: 'android'

dependencies {
compile project(':actionbarsherlock')
}

android {
compileSdkVersion 14
buildToolsVersion '17'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
2 changes: 1 addition & 1 deletion actionbarsherlock-samples/fragments/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
own application, the package name must be changed from "com.example.*"
to come from a domain that you own or have control over. --><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="431" android:versionName="4.3.1" package="com.actionbarsherlock.sample.fragments">

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>

<uses-permission android:name="android.permission.READ_CONTACTS"/>

Expand Down
18 changes: 18 additions & 0 deletions actionbarsherlock-samples/fragments/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apply plugin: 'android'

dependencies {
compile project(':actionbarsherlock')
}

android {
compileSdkVersion 14
buildToolsVersion '17'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
2 changes: 1 addition & 1 deletion actionbarsherlock-samples/known-bugs/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="431" android:versionName="4.3.1" package="com.actionbarsherlock.sample.knownbugs">

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>

<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>

Expand Down
18 changes: 18 additions & 0 deletions actionbarsherlock-samples/known-bugs/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apply plugin: 'android'

dependencies {
compile project(':actionbarsherlock')
}

android {
compileSdkVersion 14
buildToolsVersion '17'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import android.os.Bundle;
import android.provider.SearchRecentSuggestions;
import android.widget.Toast;
import com.actionbarsherlock.R;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
Expand Down
2 changes: 1 addition & 1 deletion actionbarsherlock-samples/roboguice/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="431" android:versionName="4.3.1" package="com.actionbarsherlock.sample.roboguice">

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>

<uses-permission android:name="android.permission.VIBRATE"/>

Expand Down
19 changes: 19 additions & 0 deletions actionbarsherlock-samples/roboguice/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apply plugin: 'android'

dependencies {
compile project(':actionbarsherlock')
compile 'com.github.rtyley:roboguice-sherlock:1.5'
}

android {
compileSdkVersion 14
buildToolsVersion '17'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
2 changes: 1 addition & 1 deletion actionbarsherlock-samples/styled/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="431" android:versionName="4.3.1" package="com.actionbarsherlock.sample.styled">

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>

<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>

Expand Down
19 changes: 19 additions & 0 deletions actionbarsherlock-samples/styled/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apply plugin: 'android'

dependencies {
compile project(':actionbarsherlock')
compile 'com.nineoldandroids:library:2.4.0'
}

android {
compileSdkVersion 14
buildToolsVersion '17'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
4 changes: 1 addition & 3 deletions actionbarsherlock/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="100" android:versionName="4.2.0" package="com.actionbarsherlock">

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>
</manifest>
18 changes: 18 additions & 0 deletions actionbarsherlock/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apply plugin: 'android-library'

dependencies {
compile 'com.google.android:support-v4:r7'
}

android {
compileSdkVersion 14
buildToolsVersion '17'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
20 changes: 20 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
buildscript {
repositories {
mavenCentral()
}

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

allprojects {
group = 'com.actionbarsherlock'
version = '4.3.2-SNAPSHOT'

repositories {
mavenCentral()
}
}

apply plugin: 'android-reporting'
8 changes: 8 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include 'actionbarsherlock'
//include 'actionbarsherlock-fest'
include 'actionbarsherlock-i18n'
include 'actionbarsherlock-samples:demos'
include 'actionbarsherlock-samples:fragments'
include 'actionbarsherlock-samples:known-bugs'
include 'actionbarsherlock-samples:roboguice'
include 'actionbarsherlock-samples:styled'

0 comments on commit d1ea971

Please sign in to comment.