Skip to content

Commit 14b67ac

Browse files
committed
Merge pull request daimajia#159 from Evisceration/jitpack-support
gradle: add jitpack.io support
2 parents 6f6498e + 0734b92 commit 14b67ac

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
maven {
7+
url "https://jitpack.io"
8+
}
69
}
710
dependencies {
811
classpath 'com.android.tools.build:gradle:1.0.0'
12+
classpath 'com.github.dcendents:android-maven-plugin:1.2'
913

1014
// NOTE: Do not place your application dependencies here; they belong
1115
// in the individual module build.gradle files
@@ -15,5 +19,8 @@ buildscript {
1519
allprojects {
1620
repositories {
1721
jcenter()
22+
maven {
23+
url "https://jitpack.io"
24+
}
1825
}
1926
}

library/build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,14 @@ dependencies {
1414
compile 'com.android.support:recyclerview-v7:21.0.0'
1515
compile 'com.android.support:support-v4:22.1.1'
1616
}
17-
apply from: './gradle-mvn-push.gradle'
17+
apply from: './gradle-mvn-push.gradle'
18+
19+
apply plugin: 'android-maven'
20+
// build a jar with source files
21+
task sourcesJar(type: Jar) {
22+
from android.sourceSets.main.java.srcDirs
23+
classifier = 'sources'
24+
}
25+
artifacts {
26+
archives sourcesJar
27+
}

0 commit comments

Comments
 (0)