You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-13Lines changed: 30 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,25 @@ Example Android library project that works with jitpack.io.
6
6
7
7
See this [Tutorial](https://medium.com/@ome450901/publish-an-android-library-by-jitpack-a0342684cbd0) on how to publish an Android Library with JitPack.
8
8
9
-
For more details check out the [documentation](https://github.com/jitpack/jitpack.io/blob/master/ANDROID.md)
9
+
For more details check out the [documentation](https://docs.jitpack.io/android/)
To enable installing into local maven repository and JitPack you need to add the [android-maven](https://github.com/dcendents/android-maven-gradle-plugin) plugin:
38
+
To enable installing into local maven repository and JitPack you need to add the [maven-publish](https://developer.android.com/studio/build/maven-publish-plugin) plugin:
37
39
38
-
1. Add `classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'` to root build.gradle under `buildscript { dependencies {`
39
-
2. Add `com.github.dcendents.android-maven` to the library/build.gradle
40
+
Then add the publishing section to your library build.gradle:
41
+
```gradle
42
+
publishing {
43
+
publications {
44
+
release(MavenPublication) {
45
+
groupId = 'com.my-company'
46
+
artifactId = 'my-library'
47
+
version = '1.0'
48
+
49
+
afterEvaluate {
50
+
from components.release
51
+
}
52
+
}
53
+
}
54
+
}
55
+
```
40
56
41
57
After these changes you should be able to run:
42
58
43
-
./gradlew install
59
+
./gradlew publishToMavenLocal
44
60
45
-
from the root of your project. If install works and you have added a GitHub release it should work on jitpack.io
61
+
from the root of your project.
62
+
If `publishToMavenLocal` works and you have added a GitHub release it should work on jitpack.io
0 commit comments