summaryrefslogtreecommitdiff
path: root/Source/Android
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2022-12-11 20:12:47 +0100
committerGitHub <noreply@github.com>2022-12-11 20:12:47 +0100
commit19db7a87a32733432e452fb8be177ccc2c0780da (patch)
tree7c086c2f7fe27c74c7eba751b61087f0507ec512 /Source/Android
parentfdd5190b4c70c75df923de8d77c8a0dcc10b125f (diff)
parent8226506c8433a922e0904c52d7b01cf2b1d788c8 (diff)
Merge pull request #11343 from t895/kotlin-clean
Android: Introduce Kotlin support
Diffstat (limited to 'Source/Android')
-rw-r--r--Source/Android/app/build.gradle10
-rw-r--r--Source/Android/build.gradle21
-rw-r--r--Source/Android/gradle.properties12
-rw-r--r--Source/Android/settings.gradle14
4 files changed, 34 insertions, 23 deletions
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
+org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
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
-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
+# 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'