diff --git a/build.gradle b/build.gradle index 5c4117fb575..3df795fbf06 100644 --- a/build.gradle +++ b/build.gradle @@ -24,23 +24,30 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.6.21' + ext { + agp_version1 = '8.6.1' + agp_version = '8.0.0' + } + ext.kotlin_version = '1.8.22' ext.koin_version = '2.1.6' ext.lifecycle_version = '2.2.0' ext.jacoco_core_version = '0.8.7' + repositories { google() mavenCentral() maven { url "https://developer.huawei.com/repo/" } + gradlePluginPortal() // Required for Gradle plugins } dependencies { // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files - classpath 'com.android.tools.build:gradle:7.4.2' + classpath "com.android.tools.build:gradle:$agp_version1" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jacoco:org.jacoco.core:$jacoco_core_version" classpath 'com.huawei.agconnect:agcp:1.4.2.300' + classpath 'com.github.ben-manes:gradle-versions-plugin:0.51.0' // Add the plugin here } } @@ -51,4 +58,13 @@ allprojects { mavenCentral() maven { url "https://developer.huawei.com/repo/" } } + + configurations.all { + resolutionStrategy { + force 'org.xerial:sqlite-jdbc:3.34.0' + } + } } + +// Apply the plugin explicitly to the root project +apply plugin: 'com.github.ben-manes.versions' diff --git a/catroid/gradle/code_quality_tasks.gradle b/catroid/gradle/code_quality_tasks.gradle index 572a0cce017..90da52e8213 100644 --- a/catroid/gradle/code_quality_tasks.gradle +++ b/catroid/gradle/code_quality_tasks.gradle @@ -68,7 +68,7 @@ task pmd(type: Pmd) { reports { xml.required = true - html.enabled = false + html.required = false xml.destination file("build/reports/pmd.xml") } } diff --git a/catroid/src/catroid/res/values/strings.xml b/catroid/src/catroid/res/values/strings.xml index b96b3a746a5..735676c1fe9 100644 --- a/catroid/src/catroid/res/values/strings.xml +++ b/catroid/src/catroid/res/values/strings.xml @@ -24,4 +24,5 @@ Pocket Code + "" \ No newline at end of file diff --git a/catroid/src/main/AndroidManifest.xml b/catroid/src/main/AndroidManifest.xml index 61f06800d87..6f9a6b3d808 100644 --- a/catroid/src/main/AndroidManifest.xml +++ b/catroid/src/main/AndroidManifest.xml @@ -63,6 +63,9 @@ + + + = Build.VERSION_CODES.S) { pendingIntent = PendingIntent.getActivity(getActivity(), 0, nfcIntent, PendingIntent.FLAG_IMMUTABLE); } else { - pendingIntent = PendingIntent.getActivity(getActivity(), 0, nfcIntent, 0); + pendingIntent = PendingIntent.getActivity(getActivity(), 0, nfcIntent, PendingIntent.FLAG_IMMUTABLE); } if (nfcAdapter != null && !nfcAdapter.isEnabled()) { diff --git a/catroid/src/main/java/org/catrobat/catroid/utils/LiveDataExtensions.kt b/catroid/src/main/java/org/catrobat/catroid/utils/LiveDataExtensions.kt index 052bd104225..a7c64c139b6 100644 --- a/catroid/src/main/java/org/catrobat/catroid/utils/LiveDataExtensions.kt +++ b/catroid/src/main/java/org/catrobat/catroid/utils/LiveDataExtensions.kt @@ -68,8 +68,8 @@ fun LiveData.getOrAwaitValue( var data: T? = null val latch = CountDownLatch(1) val observer = object : Observer { - override fun onChanged(o: T?) { - data = o + override fun onChanged(value: T) { + data = value latch.countDown() this@getOrAwaitValue.removeObserver(this) } diff --git a/catroid/src/main/java/org/catrobat/catroid/utils/notifications/StatusBarNotificationManager.java b/catroid/src/main/java/org/catrobat/catroid/utils/notifications/StatusBarNotificationManager.java index b0891816224..751e6a93028 100644 --- a/catroid/src/main/java/org/catrobat/catroid/utils/notifications/StatusBarNotificationManager.java +++ b/catroid/src/main/java/org/catrobat/catroid/utils/notifications/StatusBarNotificationManager.java @@ -86,7 +86,7 @@ private NotificationData createAndShowUploadNotification(Context context, String PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE); } else { pendingIntent = PendingIntent.getActivity(context, notificationId, - uploadIntent, PendingIntent.FLAG_CANCEL_CURRENT); + uploadIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE); } NotificationData data = new NotificationData(R.drawable.ic_stat, programName, @@ -242,7 +242,7 @@ public Notification createUploadRejectedNotification(Context context, int status PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE); } else { pendingIntent = PendingIntent.getActivity(context, notificationId, - openIntent, PendingIntent.FLAG_CANCEL_CURRENT); + openIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE); } builder.setContentIntent(pendingIntent); diff --git a/gradle.properties b/gradle.properties index e484fc83bbd..43f821059c2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -32,3 +32,7 @@ android.useAndroidX=true android.enableJetifier=true org.gradle.caching=false +android.nonTransitiveRClass=false +android.nonFinalResIds=false +android.enableResourceValidation=false + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 68ddaeb6203..53c4d53382d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Jun 09 18:08:52 CEST 2023 +#Fri Jan 10 11:36:51 CET 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists