Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apply plugin: 'android-library'
repositories {
mavenLocal()
}
dependencies {
compile 'com.google.android:support-v4:r7'
}
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository url: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath
}
}
}
task install(dependsOn: uploadArchives)
android {
compileSdkVersion 14
buildToolsVersion '17'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="...org.you.yourpackage...">
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="17" <!-- Use same targetSdk as ActionBarSherlock -->
/>
<application></application> <!-- You *need* <application> even if your project is a library. Without this line 'gradle build' will crash for me with a RuntimeException: https://code.google.com/p/android/issues/detail?id=40248 -->
</manifest>
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4.2'
}
}
apply plugin: 'android-library'
version='1.0'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.3.2-SNAPSHOT'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0"
}
@morristech

This comment has been minimized.

Copy link

commented Jun 15, 2013

thank you for example, really made a difference!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.