I create an android project with android studio.
It will generate some apks.
How can i publish apks to the Maven Central with gradle?
What can i write in the artifacts for the apk?
apply plugin: 'maven'
apply plugin: 'signing'
configurations {
archives {
extendsFrom configurations.default
}
}
afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
configurePOM(pom)
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: sonatypeRepositoryUrl) {
authentication(userName: nexusUsername, password: nexusPassword)
}
}
}
}
......
artifacts {
archives file: files(dir: '$buildDir/apk/*.apk', include: '*.apk')
// archives androidReleaseApklib
archives androidReleaseJar
archives androidSourcesJar
archives androidJavadocsJar
}
}