Upgrade Android targetSdk version
MSALSets the targetSdk (or legacy targetSdkVersion) value in an Android module's android { defaultConfig { } } block. Handles literal int, string form ('android-N'), extra-property reference, version-catalog reference (libs.versions.*.toml), and gradle.properties reference. Will not downgrade an already-newer value, and will not upgrade past minSdkFloor if specified.
org. openrewrite. android. UpgradeTargetSdkVersionRequired
The new targetSdk value to set.
Optional
If set, refuses to upgrade targetSdk past this value. Useful when coordinating with a separate min-SDK policy that caps the target SDK.
mod run . --recipe= org. openrewrite. android. UpgradeTargetSdkVersion \
-P to=34Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.