Skip to content

Commit 4b70404

Browse files
authored
Fix gradle publishing configuration (#110)
1 parent 160c521 commit 4b70404

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
1.26.0 / 2019-02-13
32
===================
43

all/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ android {
2626

2727
dependencies {
2828
implementation fileTree(dir: 'libs', include: ['*.jar'])
29-
implementation project(path: ':core')
30-
implementation project(path: ':preprocess')
31-
implementation project(path: ':ui')
29+
api project(path: ':core')
30+
api project(path: ':preprocess')
31+
api project(path: ':ui')
3232

3333
implementation 'androidx.appcompat:appcompat:1.1.0'
3434
testImplementation 'junit:junit:4.12'

publish.gradle

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ if (hasProperty("ossrhPassword")) {
1919
mavenAar(MavenPublication) {
2020
from components.android
2121

22-
// artifact(file("$buildDir/outputs/aar/lib-release.aar.asc")) {
22+
artifact(file("$buildDir/libs/$jarFileName-$version-javadoc.jar.asc")) {
23+
classifier = 'javadoc'
24+
extension = 'jar.asc'
25+
}
26+
27+
artifact(file("$buildDir/libs/$jarFileName-$version-sources.jar.asc")) {
28+
classifier = 'sources'
29+
extension = 'jar.asc'
30+
}
31+
2332
artifact(file("$buildDir/outputs/aar/$jarFileName-release.aar.asc")) {
2433
classifier = null
2534
extension = 'aar.asc'
@@ -102,18 +111,18 @@ if (hasProperty("ossrhPassword")) {
102111

103112
task sourcesJar(type: Jar) {
104113
from android.sourceSets.main.java.srcDirs
105-
classifier = 'sources'
114+
archiveClassifier = 'sources'
106115
}
107116
task javadoc(type: Javadoc) {
108117
source = android.sourceSets.main.java.srcDirs
109118
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
110119
android.libraryVariants.all { var -> classpath += var.javaCompileProvider.get().classpath }
111120
}
112121
task javadocJar(type: Jar, dependsOn: javadoc) {
113-
classifier = 'javadoc'
122+
archiveClassifier = 'javadoc'
114123
from javadoc.destinationDir
115124
}
125+
116126
artifacts {
117-
archives javadocJar
118-
archives sourcesJar
127+
archives javadocJar, sourcesJar
119128
}

sample/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ android {
3333
}
3434

3535
dependencies {
36-
implementation project(':core')
37-
implementation project(':preprocess')
38-
implementation project(':ui')
36+
implementation project(':all')
3937

4038
implementation 'androidx.appcompat:appcompat:1.1.0'
4139
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

0 commit comments

Comments
 (0)