I am creating a library project in android studio. Android studio implicitly supports gradle build terminologies.
I want to publish library project to local maven repository so that I can use it in other projects. (I always have option to create library in same application but I also want to distribute this library)
I took help with this link With this link I am able to publish below three files
maven-metadata-remote.xml
maven-metadata-remote.xml.sha1
resolver-status.properties
I am still not able to publish aar file to local maven repo
1. Does this has any thing to do with application's build.gradle?
2. Am I missing to build aar file in library's build.gradle file?
(though an aar file is getting built in outputs folder)
this is my library's build.gradle
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.loopj.android:android-async-http:1.4.9'
}
// added below code with the help of link
apply plugin: 'maven'
group = 'com.a.b'
version = '1.0'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://C:/Users/XXX User/.m2/")
}
}
}