diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 544ffd3d..12fa0173 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -89,14 +89,14 @@ jobs: agp: ${{ fromJSON(needs.provide-agp-version-matrix.outputs.agp-versions) }} include: - javaVersion: 17 - gradle: "8.0" - agp: 8.0.0 + gradle: "8.2.1" + agp: 8.2.2 - javaVersion: 17 gradle: current - agp: 8.0.0 + agp: 8.2.2 - javaVersion: 19 gradle: current - agp: 8.0.0 + agp: 8.2.2 name: Run Gradle-${{ matrix.gradle }}, AGP-${{ matrix.agp }}, Java-${{ matrix.javaVersion }} steps: @@ -200,11 +200,18 @@ jobs: uses: actions/upload-artifact@v4 with: name: failedScreenshots - path: "${{ github.workspace }}/**/build/failedScreenshots" + path: "**/reports/failedScreenshots" + + - name: Upload failed screenshots + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: tests + path: "**/reports/androidTests" - name: Upload screenshot tests result uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: screenshots - path: "${{ github.workspace }}/**/build/*AndroidTest/" + path: "**/reports/screenshots**AndroidTest*/" diff --git a/.gitignore b/.gitignore index 55230842..23ca1c95 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ local.properties build/ reports/ *.iml +.kotlin diff --git a/README.md b/README.md index 06e45781..0eaaeec1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Easylauncher gradle plugin for Android +# Easylauncher Gradle Plugin for Android [![build](https://github.com/usefulness/easylauncher-gradle-plugin/actions/workflows/default.yml/badge.svg)](https://github.com/usefulness/easylauncher-gradle-plugin/actions/workflows/default.yml)  [![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/) @@ -50,6 +50,12 @@ plugins { } ``` +Alternatively, if using Version Catalog: +```toml +[plugins] +starter-easylauncher = { id = "com.starter.easylauncher", version.ref = "easylauncher" } +``` + See [related issue](https://github.com/usefulness/easylauncher-gradle-plugin/issues/80) for more information. @@ -65,26 +71,26 @@ Imagine these are the type and flavors of your app: // in app/build.gradle android { buildTypes { - debug { + named("debug") { //Debuggable, will get a default ribbon in the launcher icon } - beta { + named("release") { + //Non-debuggable, will not get any default ribbon + } + register("beta") { //Debuggable, will get a default ribbon in the launcher icon debuggable true } - canary { + register('canary') { //Non-debuggable, will not get any default ribbon debuggable false } - release { - //Non-debuggable, will not get any default ribbon - } } productFlavors { - local {} - qa {} - staging {} - production {} + register("local") {} + register("qa") {} + register("staging") {} + register("production") {} } } ``` @@ -95,36 +101,36 @@ You could customize the plugin's behaviour like this: ```groovy easylauncher { - defaultFlavorNaming true // Use flavor name for default ribbon, instead of the type name - showWarnings true // Defines if the plugins should show warnings at configuration time + defaultFlavorNaming = true // Use flavor name for default ribbon, instead of the type name + showWarnings = true // Defines if the plugins should show warnings at configuration time productFlavors { - local {} - qa { + register("local") {} + register("qa") { // Add one more filter to all `qa` variants filters redRibbonFilter() } - staging {} - production {} + register("staging") {} + register("production") {} } buildTypes { - beta { + register("beta") { // Add two more filters to all `beta` variants filters = [ customRibbon(ribbonColor: "#0000FF"), overlayFilter(file("example-custom/launcherOverlay/beta.png")) ] } - canary { + register("canary") { // Remove ALL filters to `canary` variants - enable false + enable = false } - release {} + register("release") {} } variants { - productionDebug { + register("productionDebug") { // OVERRIDE all previous filters defined for `productionDebug` variant filters = orangeRibbonFilter("custom") } @@ -141,7 +147,7 @@ easylauncher { iconNames = ["@mipmap/custom_launcher_icon"] // optional, disables automatic launcher icon discovery and will use provided icons only buildTypes { - beta { + register("beta") { // icon names can also be provided per each configuration (buildType, productFlavor or variant) iconNames = ["@mipmap/beta_launcher"] } @@ -217,8 +223,8 @@ See [related issue](https://github.com/usefulness/easylauncher-gradle-plugin/iss ## Requirements Minimal requirements for the plugin are: -- Gradle: **8.0** -- Android Gradle Plugin: **8.0.0** +- Gradle: **8.2.1** +- Android Gradle Plugin: **8.2.2** - Java Version: **11** - minSdkVersion: **26** _(theoretically there should be no lower boundary - it just hasn't been tested)_ diff --git a/sample/build.gradle b/sample/build.gradle index ad27725c..11484f10 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -15,7 +15,7 @@ buildscript { } } dependencies { - classpath "com.project.starter:android:0.73.0" + classpath "com.project.starter:android:0.74.0" classpath "io.github.usefulness:screenshot-testing-plugin:1.1.0" if (project.hasProperty("useMavenLocal")) { classpath "com.project.starter.local:easylauncher:+" @@ -108,7 +108,7 @@ subprojects { } if (lastTask != null) { - if (gradle.gradleVersion.startsWith("8.0")) { + if (gradle.gradleVersion.startsWith("8.2")) { return } tasks.named { it == "record${variant.name.capitalize()}AndroidTestScreenshotTest" }.configureEach { diff --git a/sample/example-vector/build.gradle b/sample/example-vector/build.gradle index e8367969..24e4d6e4 100644 --- a/sample/example-vector/build.gradle +++ b/sample/example-vector/build.gradle @@ -36,9 +36,6 @@ android { register("alpha") { dimension "reportedBugs" } - register("customFont") { - dimension "reportedBugs" - } register("customFontByFile") { dimension "reportedBugs" } @@ -118,10 +115,6 @@ easylauncher { alpha { filters customRibbon(ribbonColor: "#99000000", labelColor: "#88FF0000", textSizeRatio: 0.3f) } - customFont { - filters customRibbon(label: "regular", font: "ComicSansMS", position: "top"), - chromeLike(label: "bold", font: "ComicSansMS-Bold") - } customFontByFile { filters customRibbon(label: "\ue868\ue3B7", font: file("fonts/MaterialIcons-Regular.ttf"), position: "top"), chromeLike(label: "\ue857\ue8DC", font: file("fonts/MaterialIcons-Regular.ttf")) diff --git a/sample/example-vector/screenshots/Icons_doScreenshot(customFont).png b/sample/example-vector/screenshots/Icons_doScreenshot(customFont).png deleted file mode 100644 index 1cc73c54..00000000 Binary files a/sample/example-vector/screenshots/Icons_doScreenshot(customFont).png and /dev/null differ