diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index 824be80c3d..a502418417 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -1,4 +1,7 @@ -apply plugin: 'com.android.application' +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} android { compileSdkVersion 33 @@ -14,6 +17,10 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } + kotlinOptions { + jvmTarget = '1.8' + } + lint { // This is important as it will run lint but not abort on error // Lint has some overly obnoxious "errors" that should really be warnings @@ -111,6 +118,7 @@ android { dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' + implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'androidx.exifinterface:exifinterface:1.3.5' implementation 'androidx.cardview:cardview:1.0.0' diff --git a/Source/Android/build.gradle b/Source/Android/build.gradle index eefd7d17fb..60aeb09a8c 100644 --- a/Source/Android/build.gradle +++ b/Source/Android/build.gradle @@ -1,17 +1,6 @@ -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20' - } -} - -allprojects { - repositories { - google() - mavenCentral() - } +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + id 'com.android.application' version '7.3.1' apply false + id 'com.android.library' version '7.3.1' apply false + id 'org.jetbrains.kotlin.android' version '1.7.20' apply false } diff --git a/Source/Android/gradle.properties b/Source/Android/gradle.properties index 6ecbf70629..af8ed7801b 100644 --- a/Source/Android/gradle.properties +++ b/Source/Android/gradle.properties @@ -6,11 +6,11 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -android.enableJetifier=true -android.useAndroidX=true org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true +android.enableJetifier=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official diff --git a/Source/Android/settings.gradle b/Source/Android/settings.gradle index f7edb9f2b2..698c7c15b2 100644 --- a/Source/Android/settings.gradle +++ b/Source/Android/settings.gradle @@ -1,2 +1,16 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} include ':app' include ':benchmark'