diff --git a/build-logic/src/main/java/com/android/ndk/samples/buildlogic/AndroidApplicationConventionPlugin.kt b/build-logic/src/main/java/com/android/ndk/samples/buildlogic/AndroidApplicationConventionPlugin.kt index 3f6ed4d26..bc6832032 100644 --- a/build-logic/src/main/java/com/android/ndk/samples/buildlogic/AndroidApplicationConventionPlugin.kt +++ b/build-logic/src/main/java/com/android/ndk/samples/buildlogic/AndroidApplicationConventionPlugin.kt @@ -19,6 +19,12 @@ class AndroidApplicationConventionPlugin : Plugin { defaultConfig { minSdk = Versions.MIN_SDK targetSdk = Versions.TARGET_SDK + + externalNativeBuild { + cmake { + arguments.add("-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON") + } + } } compileOptions { sourceCompatibility = Versions.JAVA diff --git a/build-logic/src/main/java/com/android/ndk/samples/buildlogic/AndroidLibraryConventionPlugin.kt b/build-logic/src/main/java/com/android/ndk/samples/buildlogic/AndroidLibraryConventionPlugin.kt index 53f567eb0..1976b14f2 100644 --- a/build-logic/src/main/java/com/android/ndk/samples/buildlogic/AndroidLibraryConventionPlugin.kt +++ b/build-logic/src/main/java/com/android/ndk/samples/buildlogic/AndroidLibraryConventionPlugin.kt @@ -23,6 +23,11 @@ class AndroidLibraryConventionPlugin : Plugin { testOptions { targetSdk = Versions.TARGET_SDK } + externalNativeBuild { + cmake { + arguments.add("-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON") + } + } } compileOptions { sourceCompatibility = Versions.JAVA