Skip to content

Commit 6bd1e6c

Browse files
committed
add publish configuration
1 parent 2875d17 commit 6bd1e6c

File tree

3 files changed

+168
-74
lines changed

3 files changed

+168
-74
lines changed

fetch2/build.gradle

+20
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ apply plugin: 'kotlin-android'
44

55
apply plugin: 'kotlin-kapt'
66

7+
apply plugin: 'maven-publish'
8+
79
//apply plugin: 'com.novoda.bintray-release'
810

911
buildscript {
1012
apply from: '../versions.gradle'
1113
repositories {
1214
google()
1315
jcenter()
16+
mavenCentral()
1417
}
1518
dependencies {
1619
classpath "com.android.tools.build:gradle:$gradle_tools_version"
@@ -81,6 +84,23 @@ dependencies {
8184
// website = 'https://github.com/tonyofrancis/fetch'
8285
//}
8386

87+
task sourceJar(type: Jar) {
88+
from android.sourceSets.main.java.srcDirs
89+
classifier "source"
90+
}
91+
92+
publishing {
93+
publications {
94+
aar(MavenPublication) {
95+
groupId = 'com.tonyodev.fetch2'
96+
artifactId = 'fetch2'
97+
version = library_version
98+
artifact(sourceJar)
99+
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
100+
}
101+
}
102+
}
103+
84104
tasks.withType(Javadoc).all {
85105
enabled = false
86106
}

0 commit comments

Comments
 (0)