Created
January 7, 2016 03:40
-
-
Save up1/955829e7c67fb89ae004 to your computer and use it in GitHub Desktop.
Android Library with Artifactory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
apply plugin: 'com.jfrog.artifactory' | |
apply plugin: 'maven-publish' | |
def packageName = 'codeinputlib' | |
def libraryVersion = '1.0.0' | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:2.0.0-alpha3' | |
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.0.0" | |
// NOTE: Do not place your application dependencies here; they belong | |
// in the individual module build.gradle files | |
} | |
} | |
allprojects { | |
repositories { | |
jcenter() | |
} | |
} | |
android { | |
compileSdkVersion 22 | |
buildToolsVersion "23.0.2" | |
defaultConfig { | |
minSdkVersion 11 | |
targetSdkVersion 22 | |
versionCode 11 | |
versionName "1.1" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
} | |
dependencies { | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
} | |
publishing { | |
publications { | |
aar(MavenPublication) { | |
groupId packageName | |
version = libraryVersion | |
artifactId packageName | |
artifact("$buildDir/outputs/aar/${packageName}-release.aar") | |
} | |
} | |
} | |
artifactory { | |
contextUrl = 'http://localhost:8081/artifactory' | |
publish { | |
repository { | |
repoKey = 'demo-shared-library' | |
username = "admin" | |
password = "password" | |
} | |
defaults { | |
publications('aar') | |
publishArtifacts = true | |
// Properties to be attached to the published artifacts. | |
properties = ['qa.level': 'basic', 'dev.team': 'core'] | |
// Publish generated POM files to Artifactory (true by default) | |
publishPom = true | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
maven { url "http://localhost:8081/artifactory/demo-shared-library" }