How to implement a separate android project on Gradle dependencies, without modifying the path or url

Asked

Viewed 9 times

-1

I have this scenario in Gradle (build.Radle)

implementation ("br.com.mycompany.feature:feature:$mycompanyFeatureVersion") {
               transitive = true 
               exclude group: 'br.com.mycompany', module: 'comons'
}

I need to point the path of "Feature" in my dependencies, I am working on my machine, but I can’t change $mycompanyFeatureVersion. How can I do that? I can’t point the way to . jar directly, that’s bad practice

1 answer

0


Go on Files > New > Module

You need to create a new module (which is a folder), you must insert the connector project (project you want to insert) in the module folder, and insert the plugins into the build.Radle of the project: apply plugin: 'com.android.library' apply plugin: 'Maven-Publish'

The "library" is to transform the apk into library and "Maven-Publish" is so that the folder can be inserted as dependency.

Then enter in the dependency(build.Gradle) with the module address implementation ("us.com.company.project:modulename:$variableifisneeded)

That’s how I resolved after I put the question in the stack

Browser other questions tagged

You are not signed in. Login or sign up in order to post.