File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,21 @@ subprojects { project ->
1919 // helper to configure Android DSL safely
2020 def configureAndroid = { p ->
2121 try {
22- p. android. compileSdkVersion = 36
23- // also set targetSdkVersion where available
22+ // Support both older and newer AGP DSLs by attempting both properties.
23+ try {
24+ p. android. compileSdk = 36
25+ } catch (ignored) {
26+ // fallback for older AGP
27+ p. android. compileSdkVersion = 36
28+ }
29+
30+ // also set targetSdk / targetSdkVersion where available
2431 if (p. android. defaultConfig != null ) {
25- p. android. defaultConfig. targetSdk = 36
32+ try {
33+ p. android. defaultConfig. targetSdk = 36
34+ } catch (ignored2) {
35+ p. android. defaultConfig. targetSdkVersion = 36
36+ }
2637 }
2738 } catch (e) {
2839 // fail-safe: some subprojects may not expose android DSL in time — ignore
You can’t perform that action at this time.
0 commit comments