Skip to content

Commit 3a9b2ec

Browse files
committed
Android: Mordenize build system
1 parent 412b32d commit 3a9b2ec

File tree

5 files changed

+93
-55
lines changed

5 files changed

+93
-55
lines changed
Lines changed: 36 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,16 @@
1-
buildscript {
2-
repositories {
3-
google()
4-
mavenCentral()
5-
}
6-
7-
dependencies {
8-
classpath 'com.android.tools.build:gradle:8.13.2'
9-
}
1+
plugins {
2+
alias(libs.plugins.android.application)
103
}
114

12-
apply plugin: 'com.android.application'
13-
145
android {
6+
enableKotlin = false
157
namespace = 'dk.bearware.gui'
16-
compileSdk = 36
8+
compileSdk {
9+
version = release(36)
10+
}
1711
buildToolsVersion = '36.1.0'
1812
ndkVersion = '29.0.14206865'
1913

20-
buildFeatures {
21-
buildConfig = true
22-
viewBinding = true
23-
}
24-
25-
androidResources {
26-
generateLocaleConfig = true
27-
}
28-
2914
defaultConfig {
3015
applicationId = 'dk.bearware.gui'
3116
minSdk = 21
@@ -36,12 +21,28 @@ android {
3621
testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner'
3722
}
3823

24+
buildTypes {
25+
release {
26+
minifyEnabled = false
27+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
28+
}
29+
}
30+
3931
compileOptions {
4032
sourceCompatibility = JavaVersion.VERSION_17
4133
targetCompatibility = JavaVersion.VERSION_17
4234
coreLibraryDesugaringEnabled = true
4335
}
4436

37+
buildFeatures {
38+
buildConfig = true
39+
viewBinding = true
40+
}
41+
42+
androidResources {
43+
generateLocaleConfig = true
44+
}
45+
4546
splits {
4647
abi {
4748
enable = true
@@ -51,47 +52,29 @@ android {
5152
}
5253
}
5354

54-
buildTypes {
55-
release {
56-
minifyEnabled = false
57-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'teamtalk-proguard-rules.txt'
58-
}
59-
}
60-
61-
repositories {
62-
google()
63-
mavenCentral()
64-
}
65-
6655
lint {
6756
disable 'MissingTranslation'
6857
}
6958
}
7059

7160
dependencies {
72-
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
73-
implementation 'com.google.code.gson:gson:2.13.2'
74-
implementation 'androidx.annotation:annotation:1.9.1'
75-
implementation 'androidx.appcompat:appcompat:1.7.1'
76-
implementation 'androidx.core:core:1.17.0'
77-
implementation 'androidx.fragment:fragment:1.8.9'
78-
implementation 'androidx.media:media:1.7.1'
79-
implementation 'androidx.preference:preference:1.2.1'
80-
implementation 'androidx.viewpager:viewpager:1.1.0'
81-
implementation 'com.google.android.material:material:1.13.0'
61+
coreLibraryDesugaring libs.desugar.jdk.libs
62+
implementation libs.gson
63+
implementation libs.androidx.annotation
64+
implementation libs.androidx.appcompat
65+
implementation libs.androidx.core
66+
implementation libs.androidx.fragment
67+
implementation libs.androidx.media
68+
implementation libs.androidx.preference
69+
implementation libs.androidx.viewpager
70+
implementation libs.material
8271
implementation files('libs/TeamTalk5.jar')
8372

84-
// Required -- JUnit 4 framework
85-
testImplementation 'junit:junit:4.13.2'
73+
testImplementation libs.junit
8674
testImplementation files('libs/TeamTalk5Test.jar')
8775

88-
// Core library
89-
androidTestImplementation 'androidx.test:core:1.7.0'
90-
91-
// AndroidJUnitRunner and JUnit Rules
92-
androidTestImplementation 'androidx.test:runner:1.7.0'
93-
androidTestImplementation 'androidx.test:rules:1.7.0'
94-
95-
// Assertions
76+
androidTestImplementation libs.androidx.test.core
77+
androidTestImplementation libs.androidx.test.runner
78+
androidTestImplementation libs.androidx.test.rules
9679
androidTestImplementation files('libs/TeamTalk5Test.jar')
9780
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
org.gradle.jvmargs=-Xmx2048M
22
org.gradle.configuration-cache=true
3-
android.enableJetifier=true
4-
android.nonFinalResIds=false
53
android.useAndroidX=true
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[versions]
2+
agp = "8.13.2"
3+
desugar = "2.1.5"
4+
gson = "2.13.2"
5+
annotation = "1.9.1"
6+
appcompat = "1.7.1"
7+
core = "1.17.0"
8+
fragment = "1.8.9"
9+
media = "1.7.1"
10+
preference = "1.2.1"
11+
viewpager = "1.1.0"
12+
material = "1.13.0"
13+
junit = "4.13.2"
14+
testCore = "1.7.0"
15+
testRunner = "1.7.0"
16+
testRules = "1.7.0"
17+
18+
[libraries]
19+
desugar-jdk-libs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "desugar" }
20+
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
21+
androidx-annotation = { group = "androidx.annotation", name = "annotation", version.ref = "annotation" }
22+
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
23+
androidx-core = { group = "androidx.core", name = "core", version.ref = "core" }
24+
androidx-fragment = { group = "androidx.fragment", name = "fragment", version.ref = "fragment" }
25+
androidx-media = { group = "androidx.media", name = "media", version.ref = "media" }
26+
androidx-preference = { group = "androidx.preference", name = "preference", version.ref = "preference" }
27+
androidx-viewpager = { group = "androidx.viewpager", name = "viewpager", version.ref = "viewpager" }
28+
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
29+
junit = { group = "junit", name = "junit", version.ref = "junit" }
30+
androidx-test-core = { group = "androidx.test", name = "core", version.ref = "testCore" }
31+
androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "testRunner" }
32+
androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "testRules" }
33+
34+
[plugins]
35+
android-application = { id = "com.android.application", version.ref = "agp" }
File renamed without changes.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pluginManagement {
2+
repositories {
3+
google {
4+
content {
5+
includeGroupByRegex("com\\.android.*")
6+
includeGroupByRegex("com\\.google.*")
7+
includeGroupByRegex("androidx.*")
8+
}
9+
}
10+
mavenCentral()
11+
gradlePluginPortal()
12+
}
13+
}
14+
dependencyResolutionManagement {
15+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
16+
repositories {
17+
google()
18+
mavenCentral()
19+
}
20+
}
21+
22+
rootProject.name = "TeamTalkAndroid"

0 commit comments

Comments
 (0)