Skip to content

Commit 2c4f703

Browse files
committed
Update build for Android 35 API targeting.
Cleanup easily fixed gradle deprecation warnings.
1 parent 85a9f80 commit 2c4f703

3 files changed

Lines changed: 28 additions & 27 deletions

File tree

python-for-android/dists/kolibri/build.gradle

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
buildscript {
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:7.1.2'
8+
classpath 'com.android.tools.build:gradle:8.13.0'
99
}
1010
}
1111

1212
allprojects {
1313
repositories {
1414
google()
15-
jcenter()
16-
flatDir {
17-
dirs 'libs'
18-
}
15+
mavenCentral()
1916
}
2017
}
2118

@@ -24,7 +21,9 @@ apply plugin: 'com.android.application'
2421

2522

2623
android {
27-
compileSdk 34
24+
namespace = 'org.learningequality.Kolibri'
25+
compileSdkVersion = 35
26+
buildToolsVersion = "35.0.0"
2827
def versionPropsFile = file('version.properties')
2928
Properties versionProps = new Properties()
3029

@@ -45,21 +44,23 @@ android {
4544
def nameNoDebug = name.replace("-debug", "")
4645

4746
defaultConfig {
48-
minSdkVersion 23
49-
targetSdk 34
50-
versionCode code
51-
versionName name
47+
minSdkVersion = 23
48+
targetSdk = 35
49+
versionCode = code
50+
versionName = name
5251
manifestPlaceholders = [:]
53-
multiDexEnabled true
52+
multiDexEnabled = true
5453
setProperty("archivesBaseName", "kolibri-$nameNoDebug")
54+
buildConfigField "String", "VERSION_CODE", "\"${code.toString()}\""
5555
}
5656

5757
packagingOptions {
5858
jniLibs {
5959
useLegacyPackaging = true
6060
}
61-
exclude 'lib/**/gdbserver'
62-
exclude 'lib/**/gdb.setup'
61+
resources {
62+
excludes += ['lib/**/gdbserver', 'lib/**/gdb.setup']
63+
}
6364
}
6465

6566
signingConfigs {
@@ -73,30 +74,32 @@ android {
7374

7475
buildTypes {
7576
debug {
76-
debuggable true
77+
debuggable = true
7778
}
7879
release {
79-
signingConfig signingConfigs.release
80+
signingConfig = signingConfigs.release
8081
}
8182
}
8283

8384
compileOptions {
8485

85-
sourceCompatibility JavaVersion.VERSION_1_8
86-
targetCompatibility JavaVersion.VERSION_1_8
86+
sourceCompatibility = JavaVersion.VERSION_1_8
87+
targetCompatibility = JavaVersion.VERSION_1_8
8788

8889
}
8990

9091
sourceSets {
9192
main {
9293
jniLibs.srcDir 'libs'
93-
java {
94-
}
9594
}
9695
}
9796

98-
aaptOptions {
99-
noCompress "tflite"
97+
98+
buildFeatures {
99+
buildConfig = true
100+
}
101+
androidResources {
102+
noCompress 'tflite'
100103
}
101104

102105
}

python-for-android/dists/kolibri/src/main/AndroidManifest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<manifest
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:tools="http://schemas.android.com/tools"
5-
package="org.learningequality.Kolibri"
65
android:installLocation="auto"
76
>
87

@@ -38,7 +37,6 @@
3837
android:theme="@android:style/Theme.NoTitleBar"
3938
android:hardwareAccelerated="true"
4039
android:usesCleartextTraffic="true"
41-
android:extractNativeLibs="true"
4240
>
4341

4442

@@ -82,14 +80,14 @@
8280
android:name="androidx.work.multiprocess.RemoteWorkManagerService"
8381
android:process="@string/task_worker_process"
8482
android:exported="true"
85-
tools:replace="android:process, android:exported"
83+
tools:replace="android:exported"
8684
/>
8785

8886
<service
8987
android:name="androidx.work.impl.background.systemjob.SystemJobService"
9088
android:process="@string/task_worker_process"
9189
android:exported="true"
92-
tools:replace="android:process, android:exported"
90+
tools:replace="android:exported"
9391
/>
9492

9593
<service

python-for-android/dists/kolibri/src/main/java/org/kivy/android/PythonUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class PythonUtil {
2323
// We read this directly from the VERSION_CODE,
2424
// so that any upgrade of the app causes the Python
2525
// code to be extracted again.
26-
private static final String PrivateVersion = Integer.toString(BuildConfig.VERSION_CODE);
26+
private static final String PrivateVersion = BuildConfig.VERSION_CODE;
2727

2828
protected static void addLibraryIfExists(ArrayList<String> libsList, String pattern, File libsDir) {
2929
// pattern should be the name of the lib file, without the

0 commit comments

Comments
 (0)