mirror of
https://github.com/karasevm/PrivateDNSAndroid.git
synced 2025-06-28 12:19:57 +00:00
Migrate build config to Kotlin
This commit is contained in:
parent
8c7ff2ca8f
commit
627771d4b1
7 changed files with 110 additions and 112 deletions
2
.idea/compiler.xml
generated
2
.idea/compiler.xml
generated
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<bytecodeTargetLevel target="17" />
|
<bytecodeTargetLevel target="21" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -1,86 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.application'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'com.google.devtools.ksp'
|
|
||||||
id 'org.jetbrains.kotlin.plugin.serialization'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdk 34
|
|
||||||
androidResources {
|
|
||||||
generateLocaleConfig true
|
|
||||||
}
|
|
||||||
defaultConfig {
|
|
||||||
applicationId "ru.karasevm.privatednstoggle"
|
|
||||||
versionCode 17
|
|
||||||
versionName "1.9.0"
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
targetSdkVersion 34
|
|
||||||
minSdkVersion 28
|
|
||||||
}
|
|
||||||
buildFeatures {
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled true
|
|
||||||
shrinkResources true
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
debug {
|
|
||||||
applicationIdSuffix ".dev"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
|
||||||
}
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '17'
|
|
||||||
}
|
|
||||||
dependenciesInfo {
|
|
||||||
// Disables dependency metadata when building APKs.
|
|
||||||
includeInApk = false
|
|
||||||
// Disables dependency metadata when building Android App Bundles.
|
|
||||||
includeInBundle = false
|
|
||||||
}
|
|
||||||
namespace 'ru.karasevm.privatednstoggle'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
implementation 'androidx.core:core-ktx:1.13.1'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
|
||||||
implementation 'androidx.activity:activity-ktx:1.9.2'
|
|
||||||
implementation 'androidx.fragment:fragment-ktx:1.8.4'
|
|
||||||
implementation 'com.google.android.material:material:1.12.0'
|
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
||||||
implementation 'com.google.guava:guava:33.1.0-android'
|
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3'
|
|
||||||
|
|
||||||
|
|
||||||
def shizuku_version = '13.1.5'
|
|
||||||
implementation "dev.rikka.shizuku:api:$shizuku_version"
|
|
||||||
implementation "dev.rikka.shizuku:provider:$shizuku_version"
|
|
||||||
|
|
||||||
implementation 'org.lsposed.hiddenapibypass:hiddenapibypass:4.3'
|
|
||||||
compileOnly 'dev.rikka.hidden:stub:4.3.2'
|
|
||||||
|
|
||||||
// Room components
|
|
||||||
def roomVersion = '2.6.1'
|
|
||||||
implementation "androidx.room:room-ktx:$roomVersion"
|
|
||||||
ksp "androidx.room:room-compiler:$roomVersion"
|
|
||||||
androidTestImplementation "androidx.room:room-testing:$roomVersion"
|
|
||||||
|
|
||||||
// Lifecycle components
|
|
||||||
def lifecycleVersion = '2.8.6'
|
|
||||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
|
|
||||||
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
|
|
||||||
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
|
|
||||||
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
|
||||||
}
|
|
88
app/build.gradle.kts
Normal file
88
app/build.gradle.kts
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("com.google.devtools.ksp")
|
||||||
|
id("org.jetbrains.kotlin.plugin.serialization")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk = 35
|
||||||
|
androidResources {
|
||||||
|
generateLocaleConfig = true
|
||||||
|
}
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "ru.karasevm.privatednstoggle"
|
||||||
|
versionCode = 18
|
||||||
|
versionName = "1.10.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
targetSdk = 35
|
||||||
|
minSdk = 28
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding = true
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
isShrinkResources = true
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
debug {
|
||||||
|
applicationIdSuffix = ".dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "17"
|
||||||
|
}
|
||||||
|
dependenciesInfo {
|
||||||
|
// Disables dependency metadata when building APKs.
|
||||||
|
includeInApk = false
|
||||||
|
// Disables dependency metadata when building Android App Bundles.
|
||||||
|
includeInBundle = false
|
||||||
|
}
|
||||||
|
namespace = "ru.karasevm.privatednstoggle"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("androidx.core:core-ktx:1.15.0")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.7.0")
|
||||||
|
implementation("androidx.recyclerview:recyclerview:1.4.0")
|
||||||
|
implementation("androidx.activity:activity-ktx:1.10.0")
|
||||||
|
implementation("androidx.fragment:fragment-ktx:1.8.5")
|
||||||
|
implementation("com.google.android.material:material:1.12.0")
|
||||||
|
implementation("androidx.constraintlayout:constraintlayout:2.2.0")
|
||||||
|
implementation("com.google.guava:guava:33.1.0-android")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
|
||||||
|
|
||||||
|
val shizukuVersion = "13.1.5"
|
||||||
|
implementation("dev.rikka.shizuku:api:$shizukuVersion")
|
||||||
|
implementation("dev.rikka.shizuku:provider:$shizukuVersion")
|
||||||
|
compileOnly("dev.rikka.hidden:stub:4.3.3")
|
||||||
|
|
||||||
|
implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3")
|
||||||
|
|
||||||
|
// Room components
|
||||||
|
val roomVersion = "2.6.1"
|
||||||
|
implementation("androidx.room:room-ktx:$roomVersion")
|
||||||
|
ksp("androidx.room:room-compiler:$roomVersion")
|
||||||
|
androidTestImplementation("androidx.room:room-testing:$roomVersion")
|
||||||
|
|
||||||
|
// Lifecycle components
|
||||||
|
val lifecycleVersion = "2.8.7"
|
||||||
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion")
|
||||||
|
|
||||||
|
testImplementation("junit:junit:4.13.2")
|
||||||
|
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
||||||
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
|
||||||
|
}
|
23
build.gradle
23
build.gradle
|
@ -1,23 +0,0 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:8.5.2'
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20"
|
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
|
||||||
// in the individual module build.gradle files
|
|
||||||
}
|
|
||||||
}
|
|
||||||
plugins {
|
|
||||||
id 'org.jetbrains.kotlin.android' version '2.0.20' apply false
|
|
||||||
id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.20'
|
|
||||||
id "com.google.devtools.ksp" version "2.0.20-1.0.25" apply false
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register('clean', Delete) {
|
|
||||||
delete rootProject.layout.buildDirectory
|
|
||||||
}
|
|
19
build.gradle.kts
Normal file
19
build.gradle.kts
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath("com.android.tools.build:gradle:8.8.0")
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20")
|
||||||
|
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
plugins {
|
||||||
|
id("org.jetbrains.kotlin.android") version "2.0.20" apply false
|
||||||
|
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.20"
|
||||||
|
id("com.google.devtools.ksp") version "2.0.20-1.0.25" apply false
|
||||||
|
}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Mon Aug 16 15:36:35 MSK 2021
|
#Mon Aug 16 15:36:35 MSK 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
|
@ -6,4 +6,4 @@ dependencyResolutionManagement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject.name = "Private DNS Quick Toggle"
|
rootProject.name = "Private DNS Quick Toggle"
|
||||||
include ':app'
|
include("app")
|
Loading…
Add table
Add a link
Reference in a new issue