Skip to content

Commit

Permalink
Merge pull request #19 from percolate/use_jitpack
Browse files Browse the repository at this point in the history
Convert caffeine to use jitpack for distribution
  • Loading branch information
msya committed Mar 29, 2016
2 parents 383bc65 + 7465c65 commit 826b7e6
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 338 deletions.
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

A collection of utility classes that help make Android development faster (and safer!)


## Examples

No more unsafe type casting scattered throughout your code:
Expand All @@ -21,30 +22,17 @@ DialogUtils.quickDialog(this, "Some awesome message");
ToastUtils.quickToast(this, "Some toast message");
```



[And much more!](http://percolate.github.io/caffeine/javadoc/)


## Adding to your application

- As a [.jar](https://github.com/percolate/caffeine/tree/master/distribution) file
See https://jitpack.io/com/github/percolate/caffeine/

- Using gradle

```groovy
compile 'com.percolate:caffeine:0.3.3'
```
## Running Tests

- Using Maven

```xml
<dependency>
<groupId>com.percolate</groupId>
<artifactId>caffeine</artifactId>
<version>0.3.3</version>
</dependency>
```
`./gradlew clean test:connectedAndroidTest`


## License
Expand Down
1 change: 0 additions & 1 deletion VERSION.txt

This file was deleted.

4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}

Expand Down
19 changes: 0 additions & 19 deletions caffeine.iml

This file was deleted.

67 changes: 49 additions & 18 deletions caffeine/build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,69 @@
apply plugin: 'com.android.library'
apply plugin: 'jacoco'
apply plugin: 'com.github.dcendents.android-maven'

group 'com.percolate.caffeine'
version '1.0-SNAPSHOT'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

buildTypes {
debug {
testCoverageEnabled false
}
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 33
versionName "0.3.3"
versionCode 40
versionName "0.4.0"
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
repositories {
mavenCentral()
}

task jar(type: Jar) {
from android.sourceSets.main.java.srcDirs
jacoco {
version = '0.7.5.201505241946'
}

task makeJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('../distribution')
include('classes.jar')
rename ('classes.jar', 'caffeine-' + android.defaultConfig.versionName + ".jar")
task coverage(type:JacocoReport, dependsOn: "testDebugUnitTest") {
group = "Reporting"
description = 'Create code coverage report for android module'

classDirectories = fileTree(
dir: "$buildDir/intermediates/classes/debug",
excludes: ['**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*']
)

sourceDirectories = files("src/main/java")
executionData = files("build/jacoco/testDebugUnitTest.exec")

reports {
//noinspection GroovyAssignabilityCheck
xml {
enabled = true
destination = "build/jacocoAndroidTests.xml"
}
html.enabled = true
}
}

makeJar.dependsOn(build)
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
88 changes: 0 additions & 88 deletions caffeine/caffeine-caffeine.iml

This file was deleted.

113 changes: 0 additions & 113 deletions caffeine/maven_push.gradle

This file was deleted.

Binary file removed distribution/caffeine-0.2.0.jar
Binary file not shown.
Binary file removed distribution/caffeine-0.3.0.jar
Binary file not shown.
Binary file removed distribution/caffeine-0.3.1.jar
Binary file not shown.
Binary file removed distribution/caffeine-0.3.2.jar
Binary file not shown.
Binary file removed distribution/caffeine-0.3.3.jar
Binary file not shown.
Loading

0 comments on commit 826b7e6

Please sign in to comment.