You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
When I try to upload my package to Bintray with ./gradlew clean build bintrayUpload -PbintrayUser=<user> -PbintrayKey=<key>
I have the following error: Configuration with name 'releaseApiElements' not found
Do you have some explanations / solutions / workaround?
publishing {
repositories {
maven {
url System.env.SDK_MAVEN_SERVER_WRITE_URL
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "Basic ${System.env.SDK_MAVEN_SERVER_TOKEN}"
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
publications {
android.libraryVariants.all { variant ->
// Publishing only release buildType
if (variant.buildType.name == "release") {
"maven${variant.name.capitalize()}Aar"(MavenPublication) {
from components.findByName("android${variant.name.capitalize()}")
groupId project.ext.groupId
artifactId project.ext.artifactId
version "${android.defaultConfig.versionName}-${variant.getFlavorName()}"
}
}
}
}
}
publish {
userOrg = '<user>'
groupId = project.ext.groupId
artifactId = project.ext.artifactId
publishVersion = "${android.defaultConfig.versionName}"
desc = 'Oh hi, this is a nice description for a project, right?'
website = 'https://github.com/novoda/bintray-release'
publications = ['mavenProdReleaseAar']
}
Best regards
The text was updated successfully, but these errors were encountered:
Hi @gigaga what version of the plugin are you using? What version of Gradle?
It sounds like you are trying to publish an Android library as Java library (apiElements is not available as configuration in the Android project model, just in projects that are using the java gradle plugin).
Also the line below looks wrong:
from components.findByName("android${variant.name.capitalize()}")
There is no software component generated by the Android Gradle Plugin, so the bintray-release plugin is attempting to provide one (and this led to the dependency on an internal Gradle API as captured by #177, and is currently being worked on)
Hi @mr-archano. Thanks for your comment. In fact, if I remove the whole of bintray-release references and I conserve only the publications used by android-maven-publish plugin, it works.
Furthermore, if I replace your plugin by gradle-bintray-plugin, it works too.
Hi support,
When I try to upload my package to Bintray with
./gradlew clean build bintrayUpload -PbintrayUser=<user> -PbintrayKey=<key>
I have the following error:
Configuration with name 'releaseApiElements' not found
Do you have some explanations / solutions / workaround?
Best regards
The text was updated successfully, but these errors were encountered: