Last active
December 18, 2015 11:08
-
-
Save FrozenCow/5773016 to your computer and use it in GitHub Desktop.
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-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'] | |
} | |
} | |
} |
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
<?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> |
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
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" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you for example, really made a difference!