diff --git a/examples/DemoRunner/Builds/Android/app/build.gradle b/examples/DemoRunner/Builds/Android/app/build.gradle index a8bb4e7b24..d842224c54 100644 --- a/examples/DemoRunner/Builds/Android/app/build.gradle +++ b/examples/DemoRunner/Builds/Android/app/build.gradle @@ -4,77 +4,77 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(8) def ndkVersionString = "28.1.13356709" android { - compileSdk = 35 + compileSdk(35) ndkVersion = ndkVersionString namespace = "com.rmsl.jucedemorunner" externalNativeBuild { cmake { - path "CMakeLists.txt" + path("CMakeLists.txt") version = "3.22.1" } } signingConfigs { juceSigning { - storeFile file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore") - storePassword "android" - keyAlias "androiddebugkey" - keyPassword "android" - storeType "jks" + storeFile(file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore")) + storePassword("android") + keyAlias("androiddebugkey") + keyPassword("android") + storeType("jks") } } defaultConfig { - applicationId "com.rmsl.jucedemorunner" - minSdkVersion 24 - targetSdkVersion 35 + applicationId("com.rmsl.jucedemorunner") + minSdkVersion(24) + targetSdkVersion(35) externalNativeBuild { cmake { - arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-24", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_WEAK_API_DEFS=ON", "-DCMAKE_CXX_STANDARD=17", "-DCMAKE_CXX_EXTENSIONS=OFF" + arguments("-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-24", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_WEAK_API_DEFS=ON", "-DCMAKE_CXX_STANDARD=17", "-DCMAKE_CXX_EXTENSIONS=OFF") } } } buildTypes { debug { - initWith debug - debuggable true - jniDebuggable true + initWith(debug) + debuggable(true) + jniDebuggable(true) signingConfig = signingConfigs.juceSigning } release { - initWith release - debuggable false - jniDebuggable false + initWith(release) + debuggable(false) + jniDebuggable(false) signingConfig = signingConfigs.juceSigning } } - flavorDimensions "default" + flavorDimensions("default") productFlavors { debug_ { ndk { - abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" + abiFilters("armeabi-v7a", "x86", "arm64-v8a", "x86_64") } externalNativeBuild { cmake { - cFlags "-O0" - cppFlags "-O0" - arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG" + cFlags("-O0") + cppFlags("-O0") + arguments("-DJUCE_BUILD_CONFIGURATION=DEBUG") } } - dimension "default" + dimension("default") } release_ { externalNativeBuild { cmake { - cFlags "-O3" - cppFlags "-O3" - arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE" + cFlags("-O3") + cppFlags("-O3") + arguments("-DJUCE_BUILD_CONFIGURATION=RELEASE") } } - dimension "default" + dimension("default") } } diff --git a/extras/AudioPerformanceTest/Builds/Android/app/build.gradle b/extras/AudioPerformanceTest/Builds/Android/app/build.gradle index dac652f32a..7b7e02f6a4 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/build.gradle +++ b/extras/AudioPerformanceTest/Builds/Android/app/build.gradle @@ -4,77 +4,77 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(8) def ndkVersionString = "28.1.13356709" android { - compileSdk = 35 + compileSdk(35) ndkVersion = ndkVersionString namespace = "com.juce.audioperformancetest" externalNativeBuild { cmake { - path "CMakeLists.txt" + path("CMakeLists.txt") version = "3.22.1" } } signingConfigs { juceSigning { - storeFile file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore") - storePassword "android" - keyAlias "androiddebugkey" - keyPassword "android" - storeType "jks" + storeFile(file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore")) + storePassword("android") + keyAlias("androiddebugkey") + keyPassword("android") + storeType("jks") } } defaultConfig { - applicationId "com.juce.audioperformancetest" - minSdkVersion 24 - targetSdkVersion 35 + applicationId("com.juce.audioperformancetest") + minSdkVersion(24) + targetSdkVersion(35) externalNativeBuild { cmake { - arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-24", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_WEAK_API_DEFS=ON", "-DCMAKE_CXX_STANDARD=17", "-DCMAKE_CXX_EXTENSIONS=OFF" + arguments("-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-24", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_WEAK_API_DEFS=ON", "-DCMAKE_CXX_STANDARD=17", "-DCMAKE_CXX_EXTENSIONS=OFF") } } } buildTypes { debug { - initWith debug - debuggable true - jniDebuggable true + initWith(debug) + debuggable(true) + jniDebuggable(true) signingConfig = signingConfigs.juceSigning } release { - initWith release - debuggable false - jniDebuggable false + initWith(release) + debuggable(false) + jniDebuggable(false) signingConfig = signingConfigs.juceSigning } } - flavorDimensions "default" + flavorDimensions("default") productFlavors { debug_ { ndk { - abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" + abiFilters("armeabi-v7a", "x86", "arm64-v8a", "x86_64") } externalNativeBuild { cmake { - cFlags "-O0" - cppFlags "-O0" - arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG" + cFlags("-O0") + cppFlags("-O0") + arguments("-DJUCE_BUILD_CONFIGURATION=DEBUG") } } - dimension "default" + dimension("default") } release_ { externalNativeBuild { cmake { - cFlags "-Ofast" - cppFlags "-Ofast" - arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE" + cFlags("-Ofast") + cppFlags("-Ofast") + arguments("-DJUCE_BUILD_CONFIGURATION=RELEASE") } } - dimension "default" + dimension("default") } } diff --git a/extras/AudioPluginHost/Builds/Android/app/build.gradle b/extras/AudioPluginHost/Builds/Android/app/build.gradle index c199e80bb6..4d73e78727 100644 --- a/extras/AudioPluginHost/Builds/Android/app/build.gradle +++ b/extras/AudioPluginHost/Builds/Android/app/build.gradle @@ -4,77 +4,77 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(8) def ndkVersionString = "28.1.13356709" android { - compileSdk = 35 + compileSdk(35) ndkVersion = ndkVersionString namespace = "com.juce.audiopluginhost" externalNativeBuild { cmake { - path "CMakeLists.txt" + path("CMakeLists.txt") version = "3.22.1" } } signingConfigs { juceSigning { - storeFile file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore") - storePassword "android" - keyAlias "androiddebugkey" - keyPassword "android" - storeType "jks" + storeFile(file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore")) + storePassword("android") + keyAlias("androiddebugkey") + keyPassword("android") + storeType("jks") } } defaultConfig { - applicationId "com.juce.audiopluginhost" - minSdkVersion 24 - targetSdkVersion 35 + applicationId("com.juce.audiopluginhost") + minSdkVersion(24) + targetSdkVersion(35) externalNativeBuild { cmake { - arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-24", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_WEAK_API_DEFS=ON", "-DCMAKE_CXX_STANDARD=17", "-DCMAKE_CXX_EXTENSIONS=OFF" + arguments("-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-24", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_WEAK_API_DEFS=ON", "-DCMAKE_CXX_STANDARD=17", "-DCMAKE_CXX_EXTENSIONS=OFF") } } } buildTypes { debug { - initWith debug - debuggable true - jniDebuggable true + initWith(debug) + debuggable(true) + jniDebuggable(true) signingConfig = signingConfigs.juceSigning } release { - initWith release - debuggable false - jniDebuggable false + initWith(release) + debuggable(false) + jniDebuggable(false) signingConfig = signingConfigs.juceSigning } } - flavorDimensions "default" + flavorDimensions("default") productFlavors { debug_ { ndk { - abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" + abiFilters("armeabi-v7a", "x86", "arm64-v8a", "x86_64") } externalNativeBuild { cmake { - cFlags "-O0" - cppFlags "-O0" - arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG" + cFlags("-O0") + cppFlags("-O0") + arguments("-DJUCE_BUILD_CONFIGURATION=DEBUG") } } - dimension "default" + dimension("default") } release_ { externalNativeBuild { cmake { - cFlags "-O3" - cppFlags "-O3" - arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE" + cFlags("-O3") + cppFlags("-O3") + arguments("-DJUCE_BUILD_CONFIGURATION=RELEASE") } } - dimension "default" + dimension("default") } } diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle b/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle index ce9469f2ea..14ec28f0d1 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/build.gradle @@ -4,77 +4,77 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(8) def ndkVersionString = "28.1.13356709" android { - compileSdk = 35 + compileSdk(35) ndkVersion = ndkVersionString namespace = "com.juce.networkgraphicsdemo" externalNativeBuild { cmake { - path "CMakeLists.txt" + path("CMakeLists.txt") version = "3.22.1" } } signingConfigs { juceSigning { - storeFile file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore") - storePassword "android" - keyAlias "androiddebugkey" - keyPassword "android" - storeType "jks" + storeFile(file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore")) + storePassword("android") + keyAlias("androiddebugkey") + keyPassword("android") + storeType("jks") } } defaultConfig { - applicationId "com.juce.networkgraphicsdemo" - minSdkVersion 24 - targetSdkVersion 35 + applicationId("com.juce.networkgraphicsdemo") + minSdkVersion(24) + targetSdkVersion(35) externalNativeBuild { cmake { - arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-24", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_WEAK_API_DEFS=ON", "-DCMAKE_CXX_STANDARD=17", "-DCMAKE_CXX_EXTENSIONS=OFF" + arguments("-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-24", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_WEAK_API_DEFS=ON", "-DCMAKE_CXX_STANDARD=17", "-DCMAKE_CXX_EXTENSIONS=OFF") } } } buildTypes { debug { - initWith debug - debuggable true - jniDebuggable true + initWith(debug) + debuggable(true) + jniDebuggable(true) signingConfig = signingConfigs.juceSigning } release { - initWith release - debuggable false - jniDebuggable false + initWith(release) + debuggable(false) + jniDebuggable(false) signingConfig = signingConfigs.juceSigning } } - flavorDimensions "default" + flavorDimensions("default") productFlavors { debug_ { ndk { - abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" + abiFilters("armeabi-v7a", "x86", "arm64-v8a", "x86_64") } externalNativeBuild { cmake { - cFlags "-Ofast" - cppFlags "-Ofast" - arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG" + cFlags("-Ofast") + cppFlags("-Ofast") + arguments("-DJUCE_BUILD_CONFIGURATION=DEBUG") } } - dimension "default" + dimension("default") } release_ { externalNativeBuild { cmake { - cFlags "-O3" - cppFlags "-O3" - arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE" + cFlags("-O3") + cppFlags("-O3") + arguments("-DJUCE_BUILD_CONFIGURATION=RELEASE") } } - dimension "default" + dimension("default") } } diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h index bf1739e21f..e8ec30b173 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h @@ -708,12 +708,12 @@ private: mo << "def ndkVersionString = \"28.1.13356709\"" << newLine << newLine; mo << "android {" << newLine; - mo << " compileSdk = " << static_cast (androidTargetSDK.get()) << newLine; + mo << " compileSdk(" << static_cast (androidTargetSDK.get()) << ')' << newLine; mo << " ndkVersion = ndkVersionString" << newLine; mo << " namespace = " << project.getBundleIdentifierString().toLowerCase().quoted() << newLine; mo << " externalNativeBuild {" << newLine; mo << " cmake {" << newLine; - mo << " path \"CMakeLists.txt\"" << newLine; + mo << " path(\"CMakeLists.txt\")" << newLine; mo << " version = \"3.22.1\"" << newLine; mo << " }" << newLine; mo << " }" << newLine; @@ -740,7 +740,7 @@ private: MemoryOutputStream mo; mo.setNewLineString (getNewLineString()); - mo << " flavorDimensions \"default\"" << newLine; + mo << " flavorDimensions(\"default\")" << newLine; mo << " productFlavors {" << newLine; for (ConstConfigIterator config (*this); config.next();) @@ -752,7 +752,7 @@ private: if (cfg.getArchitectures().isNotEmpty()) { mo << " ndk {" << newLine - << " abiFilters " << toGradleList (StringArray::fromTokens (cfg.getArchitectures(), " ", "")) << newLine + << " abiFilters(" << toGradleList (StringArray::fromTokens (cfg.getArchitectures(), " ", "")) << ')' << newLine << " }" << newLine; } @@ -762,13 +762,13 @@ private: if (getProject().getProjectType().isStaticLibrary()) mo << " targets \"" << getNativeModuleBinaryName (cfg) << "\"" << newLine; - mo << " cFlags \"-O" << cfg.getGCCOptimisationFlag() << "\"" << newLine - << " cppFlags \"-O" << cfg.getGCCOptimisationFlag() << "\"" << newLine - << " arguments \"-DJUCE_BUILD_CONFIGURATION=" << cfg.getProductFlavourCMakeIdentifier() << "\"" << newLine + mo << " cFlags(\"-O" << cfg.getGCCOptimisationFlag() << "\")" << newLine + << " cppFlags(\"-O" << cfg.getGCCOptimisationFlag() << "\")" << newLine + << " arguments(\"-DJUCE_BUILD_CONFIGURATION=" << cfg.getProductFlavourCMakeIdentifier() << "\")" << newLine << " }" << newLine << " }" << newLine << newLine - << " dimension \"default\"" << newLine + << " dimension(\"default\")" << newLine << " }" << newLine; } @@ -785,15 +785,15 @@ private: auto keyStoreFilePath = androidKeyStore.get().toString().replace ("${user.home}", "${System.properties['user.home']}") .replace ("/", "${File.separator}"); - mo << " signingConfigs {" << newLine; - mo << " juceSigning {" << newLine; - mo << " storeFile file(\"" << keyStoreFilePath << "\")" << newLine; - mo << " storePassword \"" << androidKeyStorePass.get().toString() << "\"" << newLine; - mo << " keyAlias \"" << androidKeyAlias.get().toString() << "\"" << newLine; - mo << " keyPassword \"" << androidKeyAliasPass.get().toString() << "\"" << newLine; - mo << " storeType \"jks\"" << newLine; - mo << " }" << newLine; - mo << " }" << newLine; + mo << " signingConfigs {" << newLine; + mo << " juceSigning {" << newLine; + mo << " storeFile(file(\"" << keyStoreFilePath << "\"))" << newLine; + mo << " storePassword(\"" << androidKeyStorePass.get().toString() << "\")" << newLine; + mo << " keyAlias(\"" << androidKeyAlias.get().toString() << "\")" << newLine; + mo << " keyPassword(\"" << androidKeyAliasPass.get().toString() << "\")" << newLine; + mo << " storeType(\"jks\")" << newLine; + mo << " }" << newLine; + mo << " }" << newLine; return mo.toString(); } @@ -808,22 +808,22 @@ private: MemoryOutputStream mo; mo.setNewLineString (getNewLineString()); - mo << " defaultConfig {" << newLine; + mo << " defaultConfig {" << newLine; if (! isLibrary()) - mo << " applicationId \"" << bundleIdentifier << "\"" << newLine; + mo << " applicationId(\"" << bundleIdentifier << "\")" << newLine; - mo << " minSdkVersion " << minSdkVersion << newLine; - mo << " targetSdkVersion " << targetSdkVersion << newLine; + mo << " minSdkVersion(" << minSdkVersion << ')' << newLine; + mo << " targetSdkVersion(" << targetSdkVersion << ')' << newLine; - mo << " externalNativeBuild {" << newLine; - mo << " cmake {" << newLine; + mo << " externalNativeBuild {" << newLine; + mo << " cmake {" << newLine; - mo << " arguments " << cmakeDefs.joinIntoString (", ") << newLine; + mo << " arguments(" << cmakeDefs.joinIntoString (", ") << ')' << newLine; - mo << " }" << newLine; - mo << " }" << newLine; - mo << " }" << newLine; + mo << " }" << newLine; + mo << " }" << newLine; + mo << " }" << newLine; return mo.toString(); } @@ -846,10 +846,10 @@ private: if (numDebugConfigs > 1 || ((numConfigs - numDebugConfigs) > 1)) continue; - mo << " " << (config->isDebug() ? "debug" : "release") << " {" << newLine; - mo << " initWith " << (config->isDebug() ? "debug" : "release") << newLine; - mo << " debuggable " << (config->isDebug() ? "true" : "false") << newLine; - mo << " jniDebuggable " << (config->isDebug() ? "true" : "false") << newLine; + mo << " " << (config->isDebug() ? "debug" : "release") << " {" << newLine; + mo << " initWith(" << (config->isDebug() ? "debug" : "release") << ')' << newLine; + mo << " debuggable(" << (config->isDebug() ? "true" : "false") << ')' << newLine; + mo << " jniDebuggable(" << (config->isDebug() ? "true" : "false") << ')' << newLine; mo << " signingConfig = signingConfigs.juceSigning" << newLine; mo << " }" << newLine; @@ -933,15 +933,15 @@ private: mo << " " << d << newLine; for (auto& d : StringArray::fromLines (androidJavaLibs.get().toString())) - mo << " implementation files('libs/" << File (d).getFileName() << "')" << newLine; + mo << " implementation(files('libs/" << File (d).getFileName() << "'))" << newLine; if (isInAppBillingEnabled()) - mo << " implementation 'com.android.billingclient:billing:7.0.0'" << newLine; + mo << " implementation('com.android.billingclient:billing:7.0.0')" << newLine; if (areRemoteNotificationsEnabled()) { - mo << " implementation 'com.google.firebase:firebase-core:16.0.1'" << newLine; - mo << " implementation 'com.google.firebase:firebase-messaging:17.6.0'" << newLine; + mo << " implementation('com.google.firebase:firebase-core:16.0.1')" << newLine; + mo << " implementation('com.google.firebase:firebase-messaging:17.6.0')" << newLine; } mo << " }" << newLine;