From 5cadfb7de24827e629d825f8dd8c7b66813145c6 Mon Sep 17 00:00:00 2001 From: Roberto Leinardi Date: Tue, 15 Feb 2022 23:04:22 +0100 Subject: [PATCH] Added Ruler plugin --- .github/workflows/ci.yml | 2 +- build-conventions/build.gradle | 1 + .../forlago.android-app-conventions.gradle | 1 + .../groovy/forlago.ruler-conventions.gradle | 26 +++++++++++++++++++ gradle/libs.versions.toml | 1 + 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 build-conventions/src/main/groovy/forlago.ruler-conventions.gradle diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da2d11aa..13a704f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: - name: Build uses: gradle/gradle-build-action@v2 with: - arguments: assembleRelease + arguments: bundleRelease analyzeReleaseBundle static-analysis: name: Static analysis and Unit tests diff --git a/build-conventions/build.gradle b/build-conventions/build.gradle index 594dabc8..41e63321 100644 --- a/build-conventions/build.gradle +++ b/build-conventions/build.gradle @@ -38,4 +38,5 @@ dependencies { implementation libs.plugin.triplet.play implementation libs.plugin.versionsgradle implementation libs.plugin.violation + implementation libs.plugin.ruler } diff --git a/build-conventions/src/main/groovy/forlago.android-app-conventions.gradle b/build-conventions/src/main/groovy/forlago.android-app-conventions.gradle index d7b77c48..83f1900e 100644 --- a/build-conventions/src/main/groovy/forlago.android-app-conventions.gradle +++ b/build-conventions/src/main/groovy/forlago.android-app-conventions.gradle @@ -25,6 +25,7 @@ plugins { id 'forlago.dependencies-conventions' id 'com.starter.easylauncher' id 'com.google.firebase.firebase-perf' + id 'forlago.ruler-conventions' } def applyGsmServicesPlugins = rootProject.file("app/google-services.json").exists() diff --git a/build-conventions/src/main/groovy/forlago.ruler-conventions.gradle b/build-conventions/src/main/groovy/forlago.ruler-conventions.gradle new file mode 100644 index 00000000..76b6bb95 --- /dev/null +++ b/build-conventions/src/main/groovy/forlago.ruler-conventions.gradle @@ -0,0 +1,26 @@ +/* + * Copyright 2022 Roberto Leinardi. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id 'com.spotify.ruler' +} + +ruler { + abi = "arm64-v8a" + locale = "en" + screenDensity = 480 + sdkVersion = 30 +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3b3cd69f..d7913d7d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -120,6 +120,7 @@ plugin-google-services = { module = "com.google.gms:google-services", version = plugin-hilt = { module = "com.google.dagger:hilt-android-gradle-plugin", version.ref = "hilt" } plugin-jdkdesugar = { module = "com.android.tools:desugar_jdk_libs", version = "1.1.5" } plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +plugin-ruler = { module = "com.spotify.ruler:ruler-gradle-plugin", version = "1.0.0" } plugin-spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version = "5.15.0" } plugin-triplet-play = { module = "com.github.triplet.gradle:play-publisher", version = "3.6.0" } plugin-versionsgradle = { module = "com.github.ben-manes:gradle-versions-plugin", version = "0.39.0" }