I am new in Android Studio with Gradle build. I would like to upload two jars to my maven local repository. The 1st jar is my project jar, the other jar is an external jar, I know the path to the external jar.
I tried to create a task to get my project jar first in build.gradle:
task projectJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
archiveName = 'MyApp'
}
def externalJar = new File(PATH_TO_JAR)
But I am not sure how to continue.
In Gradle, how to upload the two jars to my local maven repository? I want to specify groupName, artifactName & version for the two jars when uploading to local maven repo.