From 4b8f376ebecd8bbe1b7a4c4fd91b24d34f267f6f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 25 Oct 2024 10:17:21 +0200 Subject: [PATCH 1/4] Remove duplicated plugin apply. --- library/external/textdrawable/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/external/textdrawable/build.gradle b/library/external/textdrawable/build.gradle index 5eb27bf6aa..dcaf2d76cc 100644 --- a/library/external/textdrawable/build.gradle +++ b/library/external/textdrawable/build.gradle @@ -1,7 +1,5 @@ apply plugin: 'com.android.library' -apply plugin: 'com.android.library' - android { namespace "com.amulyakhare.textdrawable" From bbf8bf30f16ce2511f261fffd52ef443971a5019 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 25 Oct 2024 10:17:38 +0200 Subject: [PATCH 2/4] Use Java 21. --- dependencies.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 0f18443f22..1a99376a79 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -2,9 +2,9 @@ ext.versions = [ 'minSdk' : 21, 'compileSdk' : 34, 'targetSdk' : 34, - 'sourceCompat' : JavaVersion.VERSION_17, - 'targetCompat' : JavaVersion.VERSION_17, - 'jvmTarget' : "17", + 'sourceCompat' : JavaVersion.VERSION_21, + 'targetCompat' : JavaVersion.VERSION_21, + 'jvmTarget' : "21", ] def gradle = "8.4.2" From 350fa2051844a87041239d857238511e5a27f4c8 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 25 Oct 2024 10:29:16 +0200 Subject: [PATCH 3/4] Use Java 21. --- .github/workflows/build.yml | 8 ++++---- .github/workflows/nightly.yml | 4 ++-- .github/workflows/post-pr.yml | 4 ++-- .github/workflows/quality.yml | 12 ++++++------ .github/workflows/tests.yml | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d54a64ed34..4c2137f54a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,11 +28,11 @@ jobs: with: # https://github.com/actions/checkout/issues/881 ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - - name: Use JDK 17 + - name: Use JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '17' + java-version: '21' - name: Configure gradle uses: gradle/actions/setup-gradle@v3 with: @@ -57,11 +57,11 @@ jobs: with: # https://github.com/actions/checkout/issues/881 ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} - - name: Use JDK 17 + - name: Use JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '17' + java-version: '21' - name: Configure gradle uses: gradle/actions/setup-gradle@v3 with: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 67a165a107..ef73114455 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -20,11 +20,11 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.8 - - name: Use JDK 17 + - name: Use JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '17' + java-version: '21' - name: Configure gradle uses: gradle/actions/setup-gradle@v3 with: diff --git a/.github/workflows/post-pr.yml b/.github/workflows/post-pr.yml index 023945c4ee..c05e63a2db 100644 --- a/.github/workflows/post-pr.yml +++ b/.github/workflows/post-pr.yml @@ -44,11 +44,11 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.8 - - name: Use JDK 17 + - name: Use JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '17' + java-version: '21' - name: Configure gradle uses: gradle/actions/setup-gradle@v3 with: diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index c943cff5b6..7af7e55786 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -25,11 +25,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use JDK 17 + - name: Use JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '17' + java-version: '21' - name: Configure gradle uses: gradle/actions/setup-gradle@v3 with: @@ -48,11 +48,11 @@ jobs: cancel-in-progress: true steps: - uses: actions/checkout@v4 - - name: Use JDK 17 + - name: Use JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '17' + java-version: '21' - name: Configure gradle uses: gradle/actions/setup-gradle@v3 with: @@ -102,11 +102,11 @@ jobs: cancel-in-progress: true steps: - uses: actions/checkout@v4 - - name: Use JDK 17 + - name: Use JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '17' + java-version: '21' - name: Configure gradle uses: gradle/actions/setup-gradle@v3 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ffe703c606..9078ee5698 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,11 +29,11 @@ jobs: with: lfs: true fetch-depth: 0 - - name: Use JDK 17 + - name: Use JDK 21 uses: actions/setup-java@v4 with: distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '17' + java-version: '21' - name: Configure gradle uses: gradle/actions/setup-gradle@v3 with: @@ -139,11 +139,11 @@ jobs: # cancel-in-progress: true # steps: # - uses: actions/checkout@v4 -# - name: Use JDK 17 +# - name: Use JDK 21 # uses: actions/setup-java@v4 # with: # distribution: 'temurin' # See 'Supported distributions' for available options -# java-version: '17' +# java-version: '21' # - name: Configure gradle # uses: gradle/actions/setup-gradle@v3 # with: From 6d7e7446aeabbf083f6a34f4df495b4101789370 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 5 Nov 2024 09:46:27 +0100 Subject: [PATCH 4/4] Upgrade detekt and reduce detected issues (less impact on this old code). --- build.gradle | 2 +- dependencies_groups.gradle | 2 ++ tools/detekt/detekt.yml | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 2e4b5b5817..182211d18f 100644 --- a/build.gradle +++ b/build.gradle @@ -43,7 +43,7 @@ plugins { // ktlint Plugin id "org.jlleitschuh.gradle.ktlint" version "11.3.2" // Detekt - id "io.gitlab.arturbosch.detekt" version "1.22.0" + id "io.gitlab.arturbosch.detekt" version "1.23.7" // Ksp id "com.google.devtools.ksp" version "1.9.24-1.0.20" diff --git a/dependencies_groups.gradle b/dependencies_groups.gradle index 4b69468e06..3024963bf8 100644 --- a/dependencies_groups.gradle +++ b/dependencies_groups.gradle @@ -203,6 +203,7 @@ ext.groups = [ 'org.jacoco', 'org.java-websocket', 'org.jcodec', + 'org.jcommander', 'org.jetbrains', 'org.jetbrains.dokka', 'org.jetbrains.intellij.deps', @@ -229,6 +230,7 @@ ext.groups = [ 'org.reactivestreams', 'org.robolectric', 'org.slf4j', + 'org.snakeyaml', 'org.sonatype.oss', 'org.testng', 'org.threeten', diff --git a/tools/detekt/detekt.yml b/tools/detekt/detekt.yml index 62a4fc408f..c2a6552004 100644 --- a/tools/detekt/detekt.yml +++ b/tools/detekt/detekt.yml @@ -25,6 +25,8 @@ style: active: false UseCheckOrError: active: false + UnusedPrivateProperty: + active: false empty-blocks: EmptyFunctionBlock: @@ -75,6 +77,8 @@ naming: performance: SpreadOperator: active: false + ForEachOnRange: + active: false # Note: all rules for `comments` are disabled by default, but I put them here to be aware of their existence comments: @@ -91,7 +95,7 @@ comments: EndOfSentenceFormat: active: true OutdatedDocumentation: - active: true + active: false UndocumentedPublicClass: active: false UndocumentedPublicFunction: