Skip to content

Commit 5be9996

Browse files
Working on gradle for publishing
1 parent f34de45 commit 5be9996

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

settings.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
rootProject.name='WordpressClient'
2-
include ':app'
3-
include ':wordpressclient'
1+
include ':app', ':wordpressclient'

wordpressclient/build.gradle

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ android {
77
defaultConfig {
88
minSdkVersion 19
99
targetSdkVersion 29
10+
versionCode 1
11+
versionName "0.1"
1012
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
11-
consumerProguardFiles 'consumer-rules.pro'
1213
}
1314
buildTypes {
1415
release {
15-
minifyEnabled true
16+
minifyEnabled false
1617
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
1718
}
1819
}
@@ -39,6 +40,29 @@ dependencies {
3940
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
4041
}
4142

43+
task sourcesJar(type: Jar) {
44+
from android.sourceSets.main.java.srcDirs
45+
classifier = 'sources'
46+
}
47+
48+
task javadoc(type: Javadoc) {
49+
failOnError false
50+
source = android.sourceSets.main.java.sourceFiles
51+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
52+
classpath += configurations.compile
53+
}
54+
55+
// build a jar with javadoc
56+
task javadocJar(type: Jar, dependsOn: javadoc) {
57+
classifier = 'javadoc'
58+
from javadoc.destinationDir
59+
}
60+
61+
artifacts {
62+
archives sourcesJar
63+
archives javadocJar
64+
}
65+
4266
publishing {
4367
repositories {
4468
maven {

wordpressclient/consumer-rules.pro

Whitespace-only changes.

0 commit comments

Comments
 (0)