Skip to content

Commit 6cf6b4a

Browse files
committed
Add jitpack config
1 parent 3dc58d3 commit 6cf6b4a

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ allprojects {
2020
}
2121
}
2222

23+
task wrapper(type: Wrapper) {
24+
description 'Creates the gradle wrapper.'
25+
gradleVersion '3.3'
26+
}
27+
2328
task clean(type: Delete) {
2429
delete rootProject.buildDir
2530
}

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ 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-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-all.zip

library/build.gradle

+25-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: 'kotlin-android'
44

5-
group='com.trydroid'
6-
version = '1.0.0'
5+
group='com.github.minibugdev'
76

87
android {
98
compileSdkVersion 26
@@ -30,3 +29,27 @@ dependencies {
3029
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
3130
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
3231
}
32+
33+
// build a jar with source files
34+
task sourcesJar(type: Jar) {
35+
from android.sourceSets.main.java.srcDirs
36+
classifier = 'sources'
37+
}
38+
39+
task javadoc(type: Javadoc) {
40+
failOnError false
41+
source = android.sourceSets.main.java.sourceFiles
42+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
43+
classpath += configurations.compile
44+
}
45+
46+
// build a jar with javadoc
47+
task javadocJar(type: Jar, dependsOn: javadoc) {
48+
classifier = 'javadoc'
49+
from javadoc.destinationDir
50+
}
51+
52+
artifacts {
53+
archives sourcesJar
54+
archives javadocJar
55+
}

settings.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
include ':demo', ':library'
2-
rootProject.name = 'DrawableBadge'
1+
include ':library'
2+
include ':demo'

0 commit comments

Comments
 (0)