Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 2.42 KB

README.md

File metadata and controls

53 lines (39 loc) · 2.42 KB

Test Apps

This directory contains a list fo simple sample apps developed with the purpose to test the Prefetching Library and Plugin for Android Studio.

Currently, there is a total of 2 sample apps:

Testing the Prefetching Library

The library is imported using Gradle flat directory repository, configured in the sample app module at sample-app/app/libs/aar.

Using a newer version of the library

Go to the test app root directory and run the update script to update the imported version of the library:

sh scripts/update-nappa-library.sh

Alternatively, you can do the following steps to import a new version:

  1. Go to the Prefetching Library directory
  2. Build the library
    • Via the command line:
      • Run the command ./gradlew build
    • Via Android Studio
      • Open the project in Android Studio
      • Open the Gradle tool window
      • Double click at Prefetching-Library > Tasks > build > build
  3. Go to Prefetching-Library/android_prefetching_lib/build/outputs/aar
  4. Rename the file android_prefetching_lib-debug to nappa-prefetching-library.aar
  5. Optionally, create a copy of android_prefetching_lib-debug and name it android_prefetching_lib-debug-vMAJOR.MINOR.PATCH+BUILD, replacing the values with the version specified in the library Gradle build file
  6. Replace the existing library file at sample-app/app/libs/aar
  7. Open the sample app project in Android Studio

If needed, sync Gradle at File > Sync project with Gradle files

Debugging the library

  1. Open the sample app project in Android Studio
  2. Open the class finder at Navigate > Class (shortcut: double click shift OR ctrl + N)
  3. Click to locate the source in the pop-up
  4. Select the directory Prefetching Library/android_prefetching_lib/src/main
  5. Set breakpoints
  6. Run the app in debug mode

Important: Changes in the library source code will not take effect in the sample app until updating the imported AAR file