diff --git a/templates/android/template/app/build.gradle b/templates/android/template/app/build.gradle index c01e8356f..704bbca33 100644 --- a/templates/android/template/app/build.gradle +++ b/templates/android/template/app/build.gradle @@ -10,6 +10,7 @@ System.setProperty('java.awt.headless','false') android { compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION + ::if (ANDROID_GRADLE_PLUGIN>="4.0")::ndkPath '::ANDROID_NDK_ROOT_ESCAPED::'::end:: defaultConfig { applicationId "::META_PACKAGE_NAME::" diff --git a/templates/android/template/build.gradle b/templates/android/template/build.gradle index 81fe8a266..09a91e1e2 100644 --- a/templates/android/template/build.gradle +++ b/templates/android/template/build.gradle @@ -46,6 +46,7 @@ configure(subprojects.findAll {!it.file('build.gradle').exists() && it.file('bui android { compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION + ::if (ANDROID_GRADLE_PLUGIN>="4.0")::ndkPath '::ANDROID_NDK_ROOT_ESCAPED::'::end:: sourceSets { main { diff --git a/templates/android/template/local.properties b/templates/android/template/local.properties index 09b9bb3db..0a1bbe0cf 100644 --- a/templates/android/template/local.properties +++ b/templates/android/template/local.properties @@ -4,4 +4,6 @@ # Location of the SDK. This is only used by Gradle. # sdk.dir=::ANDROID_SDK_ESCAPED:: +::if (ANDROID_GRADLE_PLUGIN<"4.0"):: ndk.dir=::ANDROID_NDK_ROOT_ESCAPED:: +::end::