Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated all related dependencies and migrated to targetSDKVersion 34 (IDE-264) #5061

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Catroid: An on-device visual programming system for Android devices
* Copyright (C) 2010-2022 The Catrobat Team
* Copyright (C) 2010-2025 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand All @@ -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
}
}

Expand All @@ -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'
34 changes: 17 additions & 17 deletions catroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.android.build.api.dsl.ManagedVirtualDevice

/*
* Catroid: An on-device visual programming system for Android devices
* Copyright (C) 2010-2023 The Catrobat Team
* Copyright (C) 2010-2025 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -52,12 +52,12 @@ ext {
projectVersion = "0.9"
gdxVersion = "1.9.10"
mockitoVersion = "3.12.4"
espressoVersion = "3.1.0"
espressoVersion = "3.5.1"
playServicesVersion = '17.0.1'
cameraXVersion = "1.0.0-beta07"
room_version = "2.3.0"
room_version = "2.6.1"
coroutines_version = "1.3.2"
work_manager_version = '2.7.1'
work_manager_version = '2.8.1'
}

apply plugin: 'com.android.application'
Expand Down Expand Up @@ -107,7 +107,6 @@ def defaultVersionName = "1.3.0"

android {
compileSdk 34
buildToolsVersion = "33.0.2"

namespace 'org.catrobat.catroid'

Expand Down Expand Up @@ -363,7 +362,7 @@ dependencies {
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation ('com.esotericsoftware:kryo:5.1.1')
implementation 'id.zelory:compressor:2.1.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
// WorkManager
implementation "androidx.work:work-runtime-ktx:$work_manager_version"
implementation "androidx.work:work-runtime:$work_manager_version"
Expand All @@ -378,12 +377,12 @@ dependencies {
}

// Support libraries
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.mediarouter:mediarouter:1.1.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.mediarouter:mediarouter:1.3.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.browser:browser:1.8.0'
implementation 'androidx.core:core-ktx:1.12.0'



Expand All @@ -402,16 +401,16 @@ dependencies {
implementation "io.insert-koin:koin-androidx-scope:$koin_version"

// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:retrofit:2.11.0'
// retrofit moshi converter
implementation 'com.squareup.retrofit2:converter-moshi:2.7.1'
// Glide (Images downloader)
implementation 'com.github.bumptech.glide:glide:4.11.0'

// Lifecycle
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'

// Room
implementation("androidx.room:room-runtime:$room_version")
Expand All @@ -429,7 +428,7 @@ dependencies {
implementation "com.google.android.gms:play-services-analytics:$playServicesVersion"

implementation 'com.google.guava:guava:28.2-android'
implementation 'com.google.code.gson:gson:2.8.7'
implementation 'com.google.code.gson:gson:2.10.1'

implementation 'com.koushikdutta.async:androidasync:2.2.1'
implementation 'com.squareup.picasso:picasso:2.71828'
Expand Down Expand Up @@ -498,13 +497,14 @@ dependencies {
testImplementation 'org.powermock:powermock-module-junit4:2.0.0'
testImplementation 'org.powermock:powermock-api-mockito2:2.0.0'

testImplementation 'org.robolectric:robolectric:4.7.3'
testImplementation 'org.robolectric:robolectric:4.14.1'
implementation 'androidx.databinding:viewbinding:8.6.1'

testImplementation 'org.reflections:reflections:0.9.11'
testImplementation 'org.json:json:20190722'

// Retrofit testing
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.14.9'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:4.11.0'

// Koin for Unit tests
androidTestImplementation "io.insert-koin:koin-test:$koin_version"
Expand Down
4 changes: 2 additions & 2 deletions catroid/gradle/code_quality_tasks.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Catroid: An on-device visual programming system for Android devices
* Copyright (C) 2010-2022 The Catrobat Team
* Copyright (C) 2010-2025 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -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")
}
}
Expand Down
3 changes: 2 additions & 1 deletion catroid/src/androidTest/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Catroid: An on-device visual programming system for Android devices
~ Copyright (C) 2010-2022 The Catrobat Team
~ Copyright (C) 2010-2025 The Catrobat Team
~ (<http://developer.catrobat.org/credits>)
~
~ This program is free software: you can redistribute it and/or modify
Expand All @@ -23,4 +23,5 @@
-->
<resources>
<string name="app_name_test">CatroidTest</string>
<string name="project_id">""</string>
</resources>
3 changes: 2 additions & 1 deletion catroid/src/catroid/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Catroid: An on-device visual programming system for Android devices
~ Copyright (C) 2010-2022 The Catrobat Team
~ Copyright (C) 2010-2025 The Catrobat Team
~ (<http://developer.catrobat.org/credits>)
~
~ This program is free software: you can redistribute it and/or modify
Expand All @@ -24,4 +24,5 @@

<resources>
<string name="app_name">Pocket Code</string>
<string name="project_id">""</string>
</resources>
14 changes: 13 additions & 1 deletion catroid/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Catroid: An on-device visual programming system for Android devices
~ Copyright (C) 2010-2022 The Catrobat Team
~ Copyright (C) 2010-2025 The Catrobat Team
~ (<http://developer.catrobat.org/credits>)
~
~ This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -63,6 +63,9 @@
<uses-permission android:name="android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS"
tools:ignore="ProtectedPermissions" />

<!-- custom media picker -->
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />

<!-- gps -->
<uses-feature
android:name="android.hardware.location.gps"
Expand Down Expand Up @@ -92,6 +95,7 @@
android:icon="${appIcon}"
android:label="${appName}"
android:theme="@style/Catroid"
tools:targetAPI="34"
android:supportsRtl="true"
android:requestLegacyExternalStorage="false"
tools:ignore="UnusedAttribute"
Expand Down Expand Up @@ -272,5 +276,13 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<receiver android:name=".bluetooth.ConnectBluetoothDeviceActivity"
android:exported="true">
<intent-filter>
<action android:name="android.bluetooth.device.action.FOUND" />
<action android:name="android.bluetooth.adapter.action.DISCOVERY_STARTED" />
<action android:name="android.bluetooth.adapter.action.DISCOVERY_FINISHED" />
</intent-filter>
</receiver>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Catroid: An on-device visual programming system for Android devices
* Copyright (C) 2010-2022 The Catrobat Team
* Copyright (C) 2010-2025 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -47,7 +47,7 @@ import org.koin.java.KoinJavaComponent.get

class CameraManager(private val stageActivity: StageActivity) : LifecycleOwner {
private val cameraProvider = ProcessCameraProvider.getInstance(stageActivity).get()
private val lifecycle = LifecycleRegistry(this)
override val lifecycle = LifecycleRegistry(this)
val previewView = PreviewView(stageActivity).apply {
visibility = View.INVISIBLE
}
Expand Down Expand Up @@ -282,5 +282,5 @@ class CameraManager(private val stageActivity: StageActivity) : LifecycleOwner {
destroy()
}

override fun getLifecycle() = lifecycle

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Catroid: An on-device visual programming system for Android devices
* Copyright (C) 2010-2022 The Catrobat Team
* Copyright (C) 2010-2025 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -68,8 +68,8 @@ fun <T> LiveData<T>.getOrAwaitValue(
var data: T? = null
val latch = CountDownLatch(1)
val observer = object : Observer<T> {
override fun onChanged(o: T?) {
data = o
override fun onChanged(value: T) {
data = value
latch.countDown()
[email protected](this)
}
Expand Down
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Catroid: An on-device visual programming system for Android devices
# Copyright (C) 2010-2022 The Catrobat Team
# Copyright (C) 2010-2025 The Catrobat Team
# (<http://developer.catrobat.org/credits>)
#
# This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -32,3 +32,7 @@ android.useAndroidX=true
android.enableJetifier=true

org.gradle.caching=false
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.enableResourceValidation=false

4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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