Sunday, 17 November 2019

Dynamically add an Android project dependency during Jekins build

I have a currently have a Jenkins pipeline that builds my Android APK. I am struggling to figure out a good way to add a dependency dynamically during the build process.

I don't want to change the current build.grade file in the main repository:

dependencies {
    api 'androidx.appcompat:appcompat:1.1.0'
    ...
}

I have a dependency coming from another private repository

api 'com.private.library:some-library:1.0'

Is it possible to access the build.gradle files dependencies from a jenkins pipeline and dynamically add a dependency? Can I wrap the current android project in another gradle file that contains the dependency? Or possibly another good way to add the dependency at build time?



from Dynamically add an Android project dependency during Jekins build

No comments:

Post a Comment