Skip to content

Commit 6f0a77a

Browse files
author
Kevin Ménager
committed
Add support for Jitpack
Upgrade gradle to 3.3+
1 parent 11b4e0f commit 6f0a77a

3 files changed

Lines changed: 53 additions & 26 deletions

File tree

Lines changed: 49 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,57 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
4+
group = 'com.github.kmenager'
25

36
android {
4-
compileSdkVersion 25
5-
buildToolsVersion "25.0.2"
6-
7-
defaultConfig {
8-
minSdkVersion 15
9-
targetSdkVersion 25
10-
versionCode 1
11-
versionName "1.0"
12-
}
13-
buildTypes {
14-
release {
15-
minifyEnabled false
16-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17-
}
7+
compileSdkVersion 25
8+
buildToolsVersion "25.0.2"
9+
10+
defaultConfig {
11+
minSdkVersion 15
12+
targetSdkVersion 25
13+
versionCode 1
14+
versionName "1.0"
15+
}
16+
buildTypes {
17+
release {
18+
minifyEnabled false
19+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1820
}
21+
}
1922
}
2023

2124
dependencies {
22-
final SUPPORT_LIBRARY_VERSION = '25.2.0'
23-
compile fileTree(dir: 'libs', include: ['*.jar'])
24-
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25-
exclude group: 'com.android.support', module: 'support-annotations'
26-
})
27-
compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
28-
compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
29-
testCompile 'junit:junit:4.12'
25+
final SUPPORT_LIBRARY_VERSION = '25.2.0'
26+
compile fileTree(dir: 'libs', include: ['*.jar'])
27+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
28+
exclude group: 'com.android.support', module: 'support-annotations'
29+
})
30+
compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
31+
compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
32+
testCompile 'junit:junit:4.12'
33+
}
34+
35+
// build a jar with source files
36+
task sourcesJar(type: Jar) {
37+
from android.sourceSets.main.java.srcDirs
38+
classifier = 'sources'
3039
}
40+
41+
task javadoc(type: Javadoc) {
42+
failOnError false
43+
source = android.sourceSets.main.java.sourceFiles
44+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
45+
classpath += configurations.compile
46+
}
47+
48+
// build a jar with javadoc
49+
task javadocJar(type: Jar, dependsOn: javadoc) {
50+
classifier = 'javadoc'
51+
from javadoc.destinationDir
52+
}
53+
54+
artifacts {
55+
archives sourcesJar
56+
archives javadocJar
57+
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.3'
9-
8+
classpath 'com.android.tools.build:gradle:2.3.1'
9+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
1212
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Dec 28 10:00:20 PST 2015
1+
#Thu May 04 11:18:45 CEST 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

0 commit comments

Comments
 (0)