From e9aa62a41a5f9a2d85f63f980d3a37792774a8b6 Mon Sep 17 00:00:00 2001 From: Lukasz Piliszczuk Date: Sun, 17 Nov 2013 04:01:20 +0100 Subject: [PATCH] Switch to external Volley dependency including the last version. --- README.md | 9 +++++ library/build.gradle | 61 +++++----------------------- pom.xml | 94 ++++++++++++++++++++++++++++++++++++++++++++ samples/build.gradle | 4 +- 4 files changed, 116 insertions(+), 52 deletions(-) create mode 100644 pom.xml diff --git a/README.md b/README.md index c5d8aa7..da7fb50 100644 --- a/README.md +++ b/README.md @@ -307,6 +307,15 @@ Current version of the Volley sub module: 4c2fe13. You can run the tests with the command line: `./gradlew library:unitTest` +### Deployment + +Volleyball relies on Volley library as jar dependency. +You can deploy one using this clone of the Google Volley repository: https://github.com/lukaspili/Android-Volley-gradle-library +Then run: `mvn clean install` to deploy the volley jar in your local or remote repository. + + + + ## TODO diff --git a/library/build.gradle b/library/build.gradle index 5f11b04..2d53ffd 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -3,24 +3,20 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:0.5.+' + classpath 'com.android.tools.build:gradle:0.6.+' } } apply plugin: 'android-library' -apply plugin: 'maven' - -group 'com.siu.android.volleyball' -archivesBaseName = 'volleyball' -version 0.1 repositories { mavenCentral() + mavenLocal() } android { compileSdkVersion 18 - buildToolsVersion "18.0.1" + buildToolsVersion "19.0.0" defaultConfig { @@ -43,8 +39,13 @@ configurations { unitTestRuntime.extendsFrom unitTestCompile } +configurations.all { + // check for updates every build + resolutionStrategy.cacheChangingModulesFor 0, 'seconds' +} + dependencies { - compile project(':library:volley') + compile group: 'com.google.volley', name:'volley', version:'1.0.0-SNAPSHOT', changing: true compile 'commons-io:commons-io:2.4' unitTestCompile files("$project.buildDir/classes/release") @@ -67,46 +68,4 @@ task unitTest(type: Test, dependsOn: assemble) { testClassesDir = project.sourceSets.unitTest.output.classesDir classpath = project.sourceSets.unitTest.runtimeClasspath } -check.dependsOn unitTest - -uploadArchives { - repositories { - mavenDeployer { - repository url: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath - } - } -} -task install(dependsOn: uploadArchives) - - -//apply plugin: 'maven-publish' -// - -//evaluationDependsOn(':library:volley') -//task sourceJar(type: Jar) { -// println getRootProject().subprojects.findAll{it.name == 'volleyy'}.name -// -// evaluationDependsOn(':library:volley') -// from android.sourceSets.main.java -// from getRootProject().subprojects.findAll{it.name == 'volley'}.sourceSets.java -// classifier "with-volley" -//} -// -//artifacts { -// archives(sourceJar) -//} - - - -// -//publishing { -// publications { -// maven(MavenPublication) { -// groupId 'org.gradle.sample' -// artifactId 'project1-sample' -// version '1.1' -// -// artifact 'test' -// } -// } -//} \ No newline at end of file +check.dependsOn unitTest \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..cb3e824 --- /dev/null +++ b/pom.xml @@ -0,0 +1,94 @@ + + + 4.0.0 + com.siu.android + volleyball + jar + 0.1-SNAPSHOT + + Volley Ball + https://github.com/lukaspili/Volley-Ball + + + UTF-8 + 1.6 + + + + + com.google.android + android + 4.1.1.4 + provided + + + + com.google.volley + volley + 1.0.0-SNAPSHOT + + + + commons-io + commons-io + 2.4 + + + + + library/src/main/java + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + 3.5.3 + + + 16 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.0 + + ${java.version} + ${java.version} + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + + \ No newline at end of file diff --git a/samples/build.gradle b/samples/build.gradle index f7824f1..a614f97 100644 --- a/samples/build.gradle +++ b/samples/build.gradle @@ -10,6 +10,7 @@ apply plugin: 'android' repositories { mavenCentral() + mavenLocal() } android { @@ -22,8 +23,9 @@ android { } dependencies { + compile project(':library') + compile 'com.android.support:support-v4:18.0.0' compile 'com.squareup.okhttp:okhttp:1.2.0' compile 'com.google.code.gson:gson:2.2.4' - compile project(':library') }