Skip to content

Commit

Permalink
Switch to external Volley dependency including the last version.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspili committed Nov 17, 2013
1 parent 3546a9e commit e9aa62a
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 52 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
61 changes: 10 additions & 51 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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")
Expand All @@ -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'
// }
// }
//}
check.dependsOn unitTest
94 changes: 94 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.siu.android</groupId>
<artifactId>volleyball</artifactId>
<packaging>jar</packaging>
<version>0.1-SNAPSHOT</version>

<name>Volley Ball</name>
<url>https://github.com/lukaspili/Volley-Ball</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.6</java.version>
</properties>

<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.google.volley</groupId>
<artifactId>volley</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
</dependencies>

<build>
<sourceDirectory>library/src/main/java</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.5.3</version>
<configuration>
<sdk>
<platform>16</platform>
</sdk>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
4 changes: 3 additions & 1 deletion samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ apply plugin: 'android'

repositories {
mavenCentral()
mavenLocal()
}

android {
Expand All @@ -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')
}

0 comments on commit e9aa62a

Please sign in to comment.