From f1c970461f84d3474dec57e8da67717a54ebe7c9 Mon Sep 17 00:00:00 2001 From: albexk Date: Thu, 16 Nov 2023 15:15:02 +0300 Subject: [PATCH] Create utils module, move Log class there BuildConfig class is now only created in the utils module --- client/android/build.gradle.kts | 2 +- client/android/settings.gradle.kts | 1 + client/android/utils/build.gradle.kts | 17 +++++++++++++++++ .../src/main/kotlin/Log.kt} | 0 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 client/android/utils/build.gradle.kts rename client/android/{src/org/amnezia/vpn/VPNLogger.kt => utils/src/main/kotlin/Log.kt} (100%) diff --git a/client/android/build.gradle.kts b/client/android/build.gradle.kts index 5461a3a9..f4d14ed8 100644 --- a/client/android/build.gradle.kts +++ b/client/android/build.gradle.kts @@ -16,7 +16,6 @@ android { namespace = "org.amnezia.vpn" buildFeatures { - buildConfig = true viewBinding = true } @@ -81,6 +80,7 @@ android { dependencies { implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar", "*.aar")))) implementation(project(":qt")) + implementation(project(":utils")) implementation(libs.androidx.core) implementation(libs.androidx.appcompat) implementation(libs.androidx.security.crypto) diff --git a/client/android/settings.gradle.kts b/client/android/settings.gradle.kts index ac37a963..26b5763f 100644 --- a/client/android/settings.gradle.kts +++ b/client/android/settings.gradle.kts @@ -34,6 +34,7 @@ rootProject.name = "AmneziaVPN" rootProject.buildFileName = "build.gradle.kts" include(":qt") +include(":utils") // get values from gradle or local properties val androidBuildToolsVersion: String by gradleProperties diff --git a/client/android/utils/build.gradle.kts b/client/android/utils/build.gradle.kts new file mode 100644 index 00000000..792d43d6 --- /dev/null +++ b/client/android/utils/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + id(libs.plugins.android.library.get().pluginId) + id(libs.plugins.kotlin.android.get().pluginId) +} + +kotlin { + jvmToolchain(17) +} + +android { + namespace = "org.amnezia.vpn" + + buildFeatures { + // add BuildConfig class + buildConfig = true + } +} diff --git a/client/android/src/org/amnezia/vpn/VPNLogger.kt b/client/android/utils/src/main/kotlin/Log.kt similarity index 100% rename from client/android/src/org/amnezia/vpn/VPNLogger.kt rename to client/android/utils/src/main/kotlin/Log.kt