File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,24 @@ subprojects {
1313 project. evaluationDependsOn(' :app' )
1414}
1515
16+ // Force compileSdkVersion and targetSdkVersion for all Android library/app projects
17+ subprojects {
18+ afterEvaluate { project ->
19+ if (project. plugins. hasPlugin(' com.android.library' ) || project. plugins. hasPlugin(' com.android.application' )) {
20+ try {
21+ project. android. compileSdkVersion = 36
22+ // also set targetSdkVersion where available
23+ if (project. android. defaultConfig != null ) {
24+ project. android. defaultConfig. targetSdk = 36
25+ }
26+ } catch (e) {
27+ // fail-safe: some subprojects may not expose android DSL in time — ignore
28+ logger. debug(" Could not force compileSdk/targetSdk for project ${ project.name} : ${ e.message} " )
29+ }
30+ }
31+ }
32+ }
33+
1634tasks. register(" clean" , Delete ) {
1735 delete rootProject. buildDir
1836}
You can’t perform that action at this time.
0 commit comments