Android
Gradle을 사용하여 Apache Archiva에 .aar 파일 게시
수색…
간단한 구현 예제
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
repositories {
mavenCentral()
}
defaultConfig {
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
provided 'com.android.support:support-v4:21.0.3'
provided 'com.android.support:appcompat-v7:21.0.3'
}
task sourceJar(type: Jar) {
classifier "source"
}
publishing {
publications {
repositories.maven {
url 'myurl/repositories/myrepo'
credentials {
username "user"
password "password"
}
}
maven(MavenPublication) {
artifacts {
groupId 'com.mycompany'
artifactId 'mylibrary'
version '1.0'
artifact 'build/outputs/aar/app-release.aar'
}
}
}
}
Modified text is an extract of the original Stack Overflow Documentation
아래 라이선스 CC BY-SA 3.0
와 제휴하지 않음 Stack Overflow