Looking for the iOS version of Y--Network? Check it out here.
- Network
The process of publishing a library is 3 steps as follow:
- Clean the project
- From Terminal, execute
./gradlew clean
- From Android Studio, Go to "Build" -> "Clean Project".
- From Terminal, execute
- Execute release build
- From Terminal, execute
./gradlew build
- From Android Studio
- Click on "Gradle" at top of the right sidebar
- Then click on the Gradle symbol (a.k.a. "Execute Gradle Task" symbol)
- This will open a popup for the command, enter the command as
gradle build
and then press enter.
- From Terminal, execute
- Publish the artifactory
- From Terminal, execute
./gradlew artifactoryPublish
- From Android Studio
- Click on "Gradle" at top of the right sidebar
- Then click on the Gradle symbol (a.k.a. "Execute Gradle Task" symbol)
- This will open a popup for the command, enter the command as
gradle artifactoryPublish
and then press enter.
- From Terminal, execute
- Sync your project to allow the changes to reflect.
- Now add any dependency you like in your project as follow:
implementation 'com.accelerator.network:core:1.0.0'
implementation 'com.accelerator.network:android:1.0.0'
-
To generate test coverage report for whole project:
- From Terminal, execute
./gradlew build jacocoTestReport
- From Android Studio
- Click on "Gradle" at top of the right sidebar
- Then click on the Gradle symbol (a.k.a. "Execute Gradle Task" symbol)
- This will open a popup for the command, enter the command
as
gradle build jacocoTestReport
and then press enter.
- This will generate the report for each module and you can find the report in each module's build folder at "${buildDir}/jacoco-report/html/index.html".
- From Terminal, execute
-
To generate test coverage report for a module:
- From Terminal, execute
./gradlew :moduleName:build :moduleName:jacocoTestReport
- From Android Studio
- Click on "Gradle" at top of the right sidebar
- Then click on the Gradle symbol (a.k.a. "Execute Gradle Task" symbol)
- This will open a popup for the command, enter the command
as
gradle :moduleName:build :moduleName:jacocoTestReport
and then press enter.
- This will generate the report for that specific module and you can find the report in the module's build folder at "${buildDir}/jacoco-report/html/index.html".
- From Terminal, execute