Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Publish Android sources jar on Gradle 5+
apply plugin: 'digital.wup.android-maven-publish'
group = 'com.github.User'
version = '0.1'
task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
}
publishing {
publications {
mavenAar(MavenPublication) {
groupId group
artifactId 'library'
version version
artifact(sourceJar)
from components.android
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.