Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buildscript {
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.0.0'
- classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.5.4"
- }
- }
- allprojects {
- apply plugin: "com.jfrog.artifactory"
- repositories {
- google()
- jcenter()
- }
- }
- task clean(type: Delete) {
- delete rootProject.buildDir
- }
- artifactory {
- contextUrl = "${artifactory_contextUrl}"
- publish {
- repository {
- repoKey = 'libs-release-local'
- username = "${artifactory_user}"
- password = "${artifactory_password}"
- maven = true
- }
- }
- resolve {
- repository {
- repoKey = 'libs-release'
- username = "${artifactory_user}"
- password = "${artifactory_password}"
- maven = true
- }
- }
- }
- apply plugin: 'com.android.library'
- apply plugin: 'maven-publish'
- def packageName = 'x.x'
- def libraryVersion = 'v1.0.0'
- android {
- compileSdkVersion 26
- defaultConfig {
- minSdkVersion 21
- targetSdkVersion 26
- versionCode 10000
- versionName libraryVersion
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- }
- publishing {
- publications {
- aar(MavenPublication) {
- groupId packageName
- version = libraryVersion
- artifactId "y"
- artifact("$buildDir/outputs/aar/$archivesBaseName-release.aar")
- }
- }
- }
- artifactory {
- publish {
- defaults {
- publications('aar')
- publishArtifacts = true
- publishBuildInfo = false
- publishPom = true
- publishIvy = false
- }
- }
- }
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'com.android.support:appcompat-v7:26.1.0'
- implementation 'com.android.support:support-v4:26.1.0'
- implementation 'com.android.support:design:26.1.0'
- implementation 'com.squareup.okhttp3:okhttp:3.8.1'
- implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
- implementation 'com.squareup.retrofit2:retrofit:2.3.0'
- implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'com.android.support.test:runner:1.0.1'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
- }
- > Task :minecommon:artifactoryPublish
- Deploying build descriptor to: https://artifactory-domain/artifactory/api/build
- Build successfully deployed. Browse it in Artifactory under https://artifactory-domain/artifactory/webapp/builds/project-name/1509633107114
- BUILD SUCCESSFUL in 2s
- 26 actionable tasks: 1 executed, 25 up-to-date
Add Comment
Please, Sign In to add comment