Dependency Management in Android Studio of former multiproject Eclipse workspace with gradle and artifactory -


i've converted eclipse workspace usable in android studio using gradle scripts in eclipse , deploying local artifactory repository.

my problem used go eclipse build-chain when developing , debugging , gradle toolchain when releasing. androidstudio (v.1.3.2) did job analysing gradle scripts , i'm able start app workbench.

there 1 bigger library imports of dependencies , app stub uses library. have 2 android studio instances open 1 each project, tried import library module copied source app stub folder.

how can accomplish develop library project in android studio without having release via 'uploadarchives' , adjusting library version in both projects time?

thanks help.

below gradle script illustrate situation:

import java.util.regex.matcher; import java.util.regex.pattern;  buildscript {      repositories {          maven {             //url 'http://debian:8081/artifactory/repo'             url 'http://debian:8081/artifactory/plugins-release'             credentials {                 username = "${artifactory_user}"                 password = "${artifactory_password}"             }         }     }     dependencies {         classpath 'com.android.tools.build:gradle:1.3.1'         classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:2.2.3'     } }  plugins {     id 'com.jfrog.artifactory' version '3.0.1' }  allprojects { }  version=theversion  apply plugin: 'maven' apply plugin: 'android'  repositories {     mavencentral()     maven {         url 'http://debian:8081/artifactory/libs-release'     } }   android {     buildtoolsversion "${android_buildtoolsversion}"      compilesdkversion 22      signingconfigs {        release {            def storepass = "";// new     string(system.console().readpassword("\n\$ enter keystore password: "))            storefile file(thekeystorepath)            storepassword storepass            keyalias thekeyalias            keypassword storepass        }     }      sourcesets {         main {             manifest.srcfile 'androidmanifest.xml'             java.srcdirs = ['src']             resources.srcdirs = ['src']             aidl.srcdirs = ['src']             renderscript.srcdirs = ['src']             res.srcdirs = ['res']             assets.srcdirs = ['assets']         }         instrumenttest.setroot('tests')     }      buildtypes {         release {             minifyenabled true             proguardfile 'proguard-project.txt'             //getdefaultproguardfile('proguard-android.txt')              signingconfig signingconfigs.release         }     }      //http://stackoverflow.com/questions/20989317/multiple-dex-files-define-landroid-support-v4-accessibilityservice-accessibility     dexoptions {         predexlibraries = false     }      lintoptions {         abortonerror false     } }  dependencies {     compile 'com.android.support:support-v4:22.0.+'      compile 'com.mydomain.common:commonbilling-lib:1.0.1@aar'     compile ('com.mydomain.mylibrary:mylibrary-lib:2.8.3@aar') {         transitive=true         exclude module: 'support-v4'     } }   artifactory {     contexturl = "${artifactory_contexturl}"   //the base artifactory url if not overridden publisher/resolver     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         }     } }   //http://6by9.wordpress.com/2011/09/01/groovy-with-gradle-and-artifactory/ uploadarchives {   dofirst {     assert version && version != 'unspecified', "version not specified. specify as:\n\tgradle -pversion=1.0 [task]\n"   }   uploaddescriptor = true } 


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -