From 0c031d772a0ca2bc436a895bb40c5b06302f44a4 Mon Sep 17 00:00:00 2001 From: InstaZDLL Date: Mon, 10 Aug 2026 07:45:07 +0200 Subject: [PATCH] =?UTF-8?q?fix(build):=20r=C3=A9parer=20la=20compilation?= =?UTF-8?q?=20apr=C3=A8s=20la=20mont=C3=A9e=20du=20groupe=20gradle-all?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le bump fusionné en 5afdce6 ne compile pas : `checkDebugAarMetadata` échoue sur quatre dépendances. Trois points à reprendre, dont un seul est bloquant. `compileSdk` 36.1 → 37 : core-ktx 1.19 et lifecycle 2.11 refusent de se lier à une API plus ancienne. `targetSdk` reste à 36 — les deux réglages sont indépendants, et rien ici n'opte pour les nouveaux comportements d'exécution. `createComposeRule` passe de `junit4` à `junit4.v2`, l'ancien étant déprécié par le nouveau BOM Compose. La v2 ordonnance en `StandardTestDispatcher` au lieu d'`UnconfinedTestDispatcher` ; la suite passe sans autre changement. `android.disallowKotlinSourceSets=false` disparaît : KSP 2.3.11 ne déclare plus ses sources générées via `kotlin.sourceSets`, ce qui était toute la raison de ce réglage — son commentaire prévoyait déjà son retrait. Vérifié sur un `clean`, et l'avertissement d'option expérimentale émis à chaque configuration part avec. Renormalise enfin `gradlew.bat`, réenregistré avec des CRLF dans l'index par le même commit alors que `.gitattributes` demande LF stocké / CRLF déployé. Git le voyait modifié en permanence, ce qui bloque jusqu'au changement de branche. Le contenu déployé sur Windows est inchangé. Claude-Session: https://claude.ai/code/session_01F89rkrDB9TxcwHbfgNoyY1 --- README.md | 2 +- app/build.gradle.kts | 7 +- .../ui/playlists/PlaylistDetailScreenTest.kt | 2 +- gradle.properties | 7 +- gradlew.bat | 164 +++++++++--------- 5 files changed, 89 insertions(+), 93 deletions(-) diff --git a/README.md b/README.md index 6651e81..c8f1806 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ local-first music player. Kotlin + Jetpack Compose + Media3. `MediaStore` (schemas versioned under `app/schemas/`) - **Images:** Coil - **DI:** manual container for now (`AppContainer`); Hilt later -- **Min SDK:** 26 (Android 8.0) · **Target/Compile SDK:** 36 +- **Min SDK:** 26 (Android 8.0) · **Target SDK:** 36 · **Compile SDK:** 37 ## Project layout diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 449879e..cdd8f3f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -12,10 +12,11 @@ ksp { android { namespace = "app.waveflow" + // 37 imposé par core-ktx 1.19 et lifecycle 2.11, qui refusent de se lier à + // une API plus ancienne. Indépendant de `targetSdk`, qui reste à 36 : rien + // ici n'opte pour les nouveaux comportements d'exécution. compileSdk { - version = release(36) { - minorApiLevel = 1 - } + version = release(37) } defaultConfig { diff --git a/app/src/test/java/app/waveflow/ui/playlists/PlaylistDetailScreenTest.kt b/app/src/test/java/app/waveflow/ui/playlists/PlaylistDetailScreenTest.kt index c953144..8f6e4d0 100644 --- a/app/src/test/java/app/waveflow/ui/playlists/PlaylistDetailScreenTest.kt +++ b/app/src/test/java/app/waveflow/ui/playlists/PlaylistDetailScreenTest.kt @@ -5,7 +5,7 @@ import androidx.compose.ui.semantics.SemanticsNode import androidx.compose.ui.semantics.SemanticsProperties import androidx.compose.ui.semantics.getOrNull import androidx.compose.ui.test.junit4.ComposeContentTestRule -import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.junit4.v2.createComposeRule import androidx.compose.ui.test.onRoot import app.waveflow.model.Playlist import app.waveflow.model.Song diff --git a/gradle.properties b/gradle.properties index c40e96b..99fc155 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,9 +16,4 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # has changed. Additionally, Gradle applies performance optimizations to task execution. org.gradle.configuration-cache=true # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official -# Le plugin KSP déclare les sources générées (Room) via `kotlin.sourceSets`, ce -# que le Kotlin intégré à AGP 9 refuse par défaut. Contournement documenté par -# Google, à retirer quand KSP passera par `android.sourceSets`. -# https://developer.android.com/r/tools/built-in-kotlin -android.disallowKotlinSourceSets=false \ No newline at end of file +kotlin.code.style=official \ No newline at end of file diff --git a/gradlew.bat b/gradlew.bat index 8508ef6..a51ec4f 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,82 +1,82 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem gradlew startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables, and ensure extensions are enabled -setlocal EnableExtensions - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -"%COMSPEC%" /c exit 1 - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -"%COMSPEC%" /c exit 1 - -:execute -@rem Setup the command line - - - -@rem Execute gradlew -@rem endlocal doesn't take effect until after the line is parsed and variables are expanded -@rem which allows us to clear the local environment before executing the java command -endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel - -:exitWithErrorLevel -@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts -"%COMSPEC%" /c exit %ERRORLEVEL% +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem gradlew startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:execute +@rem Setup the command line + + + +@rem Execute gradlew +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel + +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL%