I have a simple problem which I have not been able to solve. I have downloaded an external .aar file that I want to upload to our in house Artifactory. But I havent been able to solve the problem at all. Here is my build.gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'digital.wup:android-maven-publish:3.6.2'
}
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'digital.wup.android-maven-publish'
group 'com.hello'
def version = '3.1'
def groupA = 'com.hello'
def artifactA = 'world'
def intermediateDirName = 'outputs/aar'
def aarFileLocation = "${buildDir}/${intermediateDirName}/${artifactName}-${datadogVersion}.aar"
configurations {
aarLocal
}
dependencies {
aarLocal files('world-3.1.aar')
}
task copyFromLocal(type: Copy) {
from configurations.aarLocal
into "$buildDir/$intermediateDirName"
}
publishToMavenLocal.dependsOn copyFromLocal
publish.dependsOn copyFromLocal
publishing {
publications {
publishAarToArtifactory(MavenPublication) {
groupId groupName
artifactId artifactName
version datadogVersion
artifact "${buildDir}/${intermediateDirName}/${artifactName}-${version}.aar"
}
}
}
publishToMavenLocal
works w/o any problems but the publish
task gets skipped
Following is the error message I get Skipping task ':publish' as it has no actions.
Any help?
Basically uploading a local aar to artifactory is all that i am trying to achieve.
NOTE : The repo credentials are in our CI/CD system for artifactory.
Both
publishToMavenLocal
andpublish
are aggregate tasks without actions. They are used to trigger a bunch ofpublishPubNamePublicationToMavenLocal
tasks andpublishPubNamePublicationToRepoNameRepository
tasks respectively.Reference: https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven:tasks