In my project:https://github.com/pc-magas/sercommH300sVoipCredentialsRecovery source is seperated into 2 parts:
Core Logic is in app/src/main/java/pc_magas/vodafone_fu_h300s/logic/
and the tests for the core logic is in: app/src/test/java/pc_magas/vodafone_fu_h300s/logic/
Therefore, I want to split my build process into these phases:
app/src/main/java/pc_magas/vodafone_fu_h300s/logic/
./app/libs
Therefore how I can configure the gradle.build
to build my library first?
Well based upon this answer you'll need you create a new Java/Kotlin library in order to do this you'll need to follow these steps:
This step creates a new folder with its own build.gradle
. I'll assume that the folder's name is settings_fetcher
. The folder name is the one you choose in this window:
Also, this name mentioned above is the name you'll need to place into the application's dependency as well. So in the window shown above used settings_fetcher
as Library Name then you'll need to place the following dependency into your build.gradle
located into
Once you created the module place into app/build.gradle
the correct dependency as stated in this answer .
Then move the files located in app/src/main/java/pc_magas/vodafone_fu_h300s/logic/
into the settings_fetcher/src/main/java/pc_magas/vodafone_fu_h300s/logic/
also move any tests, related to the library, located in app/src/tests
into settings_fetcher/src/tests
(Assuming the new library is named settings_fetcher
)
Then try to run the tests and build the application as well in order to ensure the correctness of the application's functionality as well.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.