Skip to content

Commit

Permalink
Add jar target and get AndroidStudio 0.6.2 working.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjudd committed Jun 22, 2014
1 parent 8ff3251 commit 284e8c4
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 12 deletions.
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.11.+'
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jun 21 07:39:20 PDT 2014
#Sun Jun 22 01:25:24 PDT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-bin.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions library/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bumptech.glide"
android:versionCode="5"
android:versionName="3.2.0a" >
package="com.bumptech.glide">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<application />
</manifest>
43 changes: 39 additions & 4 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repositories {
dependencies {
compile project(':third_party:gif_decoder')

compile 'com.android.support:support-v4:19.0.+'
compile 'com.android.support:support-v4:19.1.+'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'com.jakewharton:disklrucache:2.0.+'

Expand All @@ -35,18 +35,35 @@ dependencies {
androidTestCompile 'org.robolectric:robolectric:2.3'
}

ext {
versionMajor = 3
versionMinor = 2
versionPatch = 0
versionBuild = 5
}

def getVersionName() {
return "${versionMajor}.${versionMinor}.${versionPatch}a"
}

android {
compileSdkVersion 19
buildToolsVersion = '19.1.0'

defaultConfig {
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName getVersionName()
}

sourceSets {
main {
resources.srcDirs = ['src/main']
java.srcDirs = ['src/main']
java.srcDirs = ['src/main/java']
manifest.srcFile 'AndroidManifest.xml'
}

instrumentTest.setRoot('src/test')
androidTest {
java.srcDirs = ['src/test/java']
}
}

lintOptions {
Expand All @@ -57,3 +74,21 @@ android {
task wrapper(type: Wrapper) {
gradleVersion = '1.10'
}

def getJarName() {
return "glide-${getVersionName()}.jar"
}

// Build a jar, from http://stackoverflow.com/a/19037807/1002054
task clearJar(type: Delete) {
delete "build/libs/${getJarName()}"
}

task makeJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('build/libs/')
include('classes.jar')
rename ('classes.jar', getJarName())
}

makeJar.dependsOn(clearJar, build)
4 changes: 1 addition & 3 deletions third_party/gif_decoder/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ android {
buildToolsVersion = '19.1.0'
sourceSets {
main {
aidl.srcDirs = ['src']
resources.srcDirs = ['src']
java.srcDirs = ['src']
java.srcDirs = ['src/main/java']
manifest.srcFile 'AndroidManifest.xml'
}
}
Expand Down

0 comments on commit 284e8c4

Please sign in to comment.