Reputation: 7536
Hi I am using Android Studio with following setup:
Android Studio version - Arctic fox
Google services - com.google.gms:google-services:4.3.8
AGP : com.android.tools.build:gradle:7.0.4
gradle verison : https://services.gradle.org/distributions/gradle-7.0.2-bin.zip
I am trying publish one artifact on my internal artifactory with following code
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
id 'com.jfrog.artifactory'
}
publishing {
publications {
aar(MavenPublication) {
groupId libraryGroupId
version libraryVersion
artifactId libraryArtifactId
artifact("$buildDir/outputs/aar/abc-release.aar")
//
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
def deps = configurations.implementation.allDependencies + configurations.api.allDependencies
deps.each {
if (it.group != null && (it.name != null || "unspecified".equals(it.name)) && it.version != null && !"unspecified".equals(it.version)) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
artifactory {
contextUrl = 'http://artifactory.local.com/artifactory'
publish {
repository {
repoKey = libraryGroupId
username = "${artifactory_user}"
password = "${artifactory_password}"
}
defaults {
publications('aar')
publishArtifacts = true
properties = ['qa.level': 'basic', 'dev.team': 'core']
publishPom = true
}
}
}
I am trying to publish artifact with following commands:
./gradlew :module:clean && ./gradlew :module:assembleRelease && ./gradlew :module:artifactoryPublish
It is giving me following issue :
* What went wrong:
Some problems were found with the configuration of task ':module:artifactoryPublish' (type 'ArtifactoryTask').
- Type 'org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask' field 'mavenPublications' without corresponding getter has been annotated with @Input, @Optional.
Reason: Annotations on fields are only used if there's a corresponding getter for the field.
Possible solutions:
1. Add a getter for field 'mavenPublications'.
2. Remove the annotations on 'mavenPublications'.
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
- Type 'org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask' field 'publishConfigs' without corresponding getter has been annotated with @InputFiles, @Optional.
Reason: Annotations on fields are only used if there's a corresponding getter for the field.
Possible solutions:
1. Add a getter for field 'publishConfigs'.
2. Remove the annotations on 'publishConfigs'.
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
- Type 'org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask' property 'deployDetails' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
1. Add an input or output annotation.
2. Mark it as @Internal.
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
- Type 'org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask' property 'evaluated' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
1. Add an input or output annotation.
2. Mark it as @Internal.
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
* Try:
Issue started appearing after updating gradle version. On older gradle version I was able to publish artifact.
Upvotes: 3
Views: 3398
Reputation: 1023
Thanks @nilkash for suggesting the fix.
Confirming that updating the jfrog version to org.jfrog.buildinfo:build-info-extractor-gradle:4.28.1
fixed the issue for me.
Upvotes: 2