Skip to content

Commit 0612259

Browse files
committed
Add maven publications to configure the jitpack
1 parent 2945b30 commit 0612259

File tree

9 files changed

+128
-6
lines changed

9 files changed

+128
-6
lines changed

bolts-tasks/build.gradle

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// This source code is licensed under the MIT license found in the/
44
// LICENSE file in the root directory of this source tree.
55

6-
apply plugin: 'java'
7-
apply plugin: 'maven'
6+
apply plugin: 'java-library'
7+
apply plugin: 'maven-publish'
88

99
dependencies {
1010
compileOnly 'com.google.android:android:4.1.1.4'
@@ -14,12 +14,12 @@ dependencies {
1414
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
1515

1616
task sourcesJar(type: Jar) {
17-
classifier = 'sources'
17+
archiveClassifier.set('sources')
1818
from sourceSets.main.allJava
1919
}
2020

2121
task javadocJar(type: Jar, dependsOn: javadoc) {
22-
classifier = 'javadoc'
22+
archiveClassifier.set('javadoc')
2323
from javadoc.destinationDir
2424
}
2525

@@ -49,3 +49,13 @@ java {
4949
sourceCompatibility = JavaVersion.VERSION_1_8
5050
targetCompatibility = JavaVersion.VERSION_1_8
5151
}
52+
53+
afterEvaluate {
54+
publishing {
55+
publications {
56+
boltsPublication(MavenPublication) {
57+
from components.java
58+
}
59+
}
60+
}
61+
}

coroutines/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: "com.android.library"
22
apply plugin: "kotlin-android"
3+
apply plugin: "maven-publish"
34
apply plugin: "io.freefair.android-javadoc-jar"
45
apply plugin: "io.freefair.android-sources-jar"
56

@@ -48,3 +49,16 @@ dependencies {
4849
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
4950
implementation project(":parse")
5051
}
52+
53+
afterEvaluate {
54+
publishing {
55+
publications {
56+
debug(MavenPublication) {
57+
from components.debug
58+
}
59+
release(MavenPublication) {
60+
from components.release
61+
}
62+
}
63+
}
64+
}

facebook/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.library"
2+
apply plugin: "maven-publish"
23
apply plugin: "io.freefair.android-javadoc-jar"
34
apply plugin: "io.freefair.android-sources-jar"
45

@@ -34,3 +35,16 @@ dependencies {
3435
testImplementation "org.mockito:mockito-core:3.9.0"
3536
testImplementation "org.robolectric:robolectric:4.6"
3637
}
38+
39+
afterEvaluate {
40+
publishing {
41+
publications {
42+
debug(MavenPublication) {
43+
from components.debug
44+
}
45+
release(MavenPublication) {
46+
from components.release
47+
}
48+
}
49+
}
50+
}

fcm/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.library"
2+
apply plugin: "maven-publish"
23
apply plugin: "io.freefair.android-javadoc-jar"
34
apply plugin: "io.freefair.android-sources-jar"
45

@@ -38,3 +39,16 @@ dependencies {
3839
api "com.google.firebase:firebase-messaging:22.0.0"
3940
implementation project(":parse")
4041
}
42+
43+
afterEvaluate {
44+
publishing {
45+
publications {
46+
debug(MavenPublication) {
47+
from components.debug
48+
}
49+
release(MavenPublication) {
50+
from components.release
51+
}
52+
}
53+
}
54+
}

google/build.gradle

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
apply plugin: 'com.android.library'
2-
apply plugin: 'kotlin-android'
1+
apply plugin: "com.android.library"
2+
apply plugin: "kotlin-android"
3+
apply plugin: "maven-publish"
34
apply plugin: "io.freefair.android-javadoc-jar"
45
apply plugin: "io.freefair.android-sources-jar"
56

@@ -36,3 +37,16 @@ dependencies {
3637
api "com.google.android.gms:play-services-auth:19.2.0"
3738
implementation project(":parse")
3839
}
40+
41+
afterEvaluate {
42+
publishing {
43+
publications {
44+
debug(MavenPublication) {
45+
from components.debug
46+
}
47+
release(MavenPublication) {
48+
from components.release
49+
}
50+
}
51+
}
52+
}

ktx/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: "com.android.library"
22
apply plugin: "kotlin-android"
3+
apply plugin: "maven-publish"
34
apply plugin: "io.freefair.android-javadoc-jar"
45
apply plugin: "io.freefair.android-sources-jar"
56

@@ -45,3 +46,16 @@ dependencies {
4546
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
4647
implementation project(":parse")
4748
}
49+
50+
afterEvaluate {
51+
publishing {
52+
publications {
53+
debug(MavenPublication) {
54+
from components.debug
55+
}
56+
release(MavenPublication) {
57+
from components.release
58+
}
59+
}
60+
}
61+
}

parse/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.library"
2+
apply plugin: "maven-publish"
23
apply plugin: "io.freefair.android-javadoc-jar"
34
apply plugin: "io.freefair.android-sources-jar"
45

@@ -57,6 +58,19 @@ dependencies {
5758
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttpVersion"
5859
}
5960

61+
afterEvaluate {
62+
publishing {
63+
publications {
64+
debug(MavenPublication) {
65+
from components.debug
66+
}
67+
release(MavenPublication) {
68+
from components.release
69+
}
70+
}
71+
}
72+
}
73+
6074
//region Code Coverage
6175

6276
apply plugin: "com.dicedmelon.gradle.jacoco-android"

rxjava/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: "com.android.library"
22
apply plugin: "kotlin-android"
3+
apply plugin: "maven-publish"
34
apply plugin: "io.freefair.android-javadoc-jar"
45
apply plugin: "io.freefair.android-sources-jar"
56

@@ -44,3 +45,16 @@ dependencies {
4445
api "io.reactivex.rxjava3:rxjava:3.0.4"
4546
implementation project(":parse")
4647
}
48+
49+
afterEvaluate {
50+
publishing {
51+
publications {
52+
debug(MavenPublication) {
53+
from components.debug
54+
}
55+
release(MavenPublication) {
56+
from components.release
57+
}
58+
}
59+
}
60+
}

twitter/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.library"
2+
apply plugin: "maven-publish"
23
apply plugin: "io.freefair.android-javadoc-jar"
34
apply plugin: "io.freefair.android-sources-jar"
45

@@ -35,3 +36,16 @@ dependencies {
3536
testImplementation "junit:junit:4.13.2"
3637
testImplementation "org.mockito:mockito-core:3.9.0"
3738
}
39+
40+
afterEvaluate {
41+
publishing {
42+
publications {
43+
debug(MavenPublication) {
44+
from components.debug
45+
}
46+
release(MavenPublication) {
47+
from components.release
48+
}
49+
}
50+
}
51+
}

0 commit comments

Comments
 (0)