diff --git a/.gitignore b/.gitignore
index eee55b3c9..a86f3ecad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,3 +58,11 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
+
+# Kotlin
+*.kotlin_module
+.kotlin/
+
+#JVM
+*.hprof
+
diff --git a/app/build.gradle b/app/build.gradle
index 67bfad76d..2d2ea8b19 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,8 +1,15 @@
apply plugin: 'com.android.application'
+apply plugin: 'org.jetbrains.kotlin.plugin.compose'
+apply plugin: 'com.mikepenz.aboutlibraries.plugin.android'
android {
compileSdk = 37
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_21
+ targetCompatibility JavaVersion.VERSION_21
+ }
+
defaultConfig {
applicationId "fr.gaulupeau.apps.InThePoche"
minSdkVersion 23
@@ -54,12 +61,21 @@ android {
namespace = 'fr.gaulupeau.apps.InThePoche'
buildFeatures {
buildConfig = true
+ compose true
}
}
dependencies {
+ // Compose
+ def composeBom = platform("androidx.compose:compose-bom:2026.04.01")
+ implementation composeBom
+ implementation "androidx.compose.ui:ui"
+ implementation "androidx.compose.material3:material3"
+ implementation "androidx.activity:activity-compose:1.13.0"
+
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'androidx.media:media:1.8.0'
+ implementation 'androidx.core:core-ktx:1.18.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.4.0'
implementation 'androidx.preference:preference:1.2.1'
@@ -72,7 +88,8 @@ dependencies {
implementation 'org.conscrypt:conscrypt-android:2.5.3'
implementation 'com.facebook.stetho:stetho:1.6.0'
implementation 'com.facebook.stetho:stetho-okhttp3:1.6.0'
- implementation 'com.mikepenz:aboutlibraries:7.1.0'
+ implementation "com.mikepenz:aboutlibraries-core:14.0.1"
+ implementation "com.mikepenz:aboutlibraries-compose-m3:14.0.1"
implementation 'com.github.di72nn.wallabag-api-wrapper:api-wrapper:v2.0.0-beta.6'
implementation 'org.slf4j:slf4j-android:1.7.36'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 9ff75dc6e..96e9d9bdc 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -131,6 +131,8 @@
+
+
diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/ui/AboutActivity.java b/app/src/main/java/fr/gaulupeau/apps/Poche/ui/AboutActivity.java
new file mode 100644
index 000000000..b48d209da
--- /dev/null
+++ b/app/src/main/java/fr/gaulupeau/apps/Poche/ui/AboutActivity.java
@@ -0,0 +1,19 @@
+package fr.gaulupeau.apps.Poche.ui;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.compose.ui.platform.ComposeView;
+import android.os.Bundle;
+
+import fr.gaulupeau.apps.InThePoche.R;
+
+public class AboutActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_about);
+
+ ComposeView composeView = findViewById(R.id.compose_view);
+ AboutLibsHelperKt.showAboutLibraries(composeView); // Kotlin Extension = statische Methode in Java
+ }
+}
diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/ui/AboutLibsHelper.kt b/app/src/main/java/fr/gaulupeau/apps/Poche/ui/AboutLibsHelper.kt
new file mode 100644
index 000000000..cd8b40946
--- /dev/null
+++ b/app/src/main/java/fr/gaulupeau/apps/Poche/ui/AboutLibsHelper.kt
@@ -0,0 +1,10 @@
+package fr.gaulupeau.apps.Poche.ui
+
+import androidx.compose.ui.platform.ComposeView
+import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer
+
+fun ComposeView.showAboutLibraries() {
+ setContent {
+ LibrariesContainer()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/ui/MainActivity.java b/app/src/main/java/fr/gaulupeau/apps/Poche/ui/MainActivity.java
index 3af10cf98..0e115a8de 100644
--- a/app/src/main/java/fr/gaulupeau/apps/Poche/ui/MainActivity.java
+++ b/app/src/main/java/fr/gaulupeau/apps/Poche/ui/MainActivity.java
@@ -40,8 +40,6 @@
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.navigation.NavigationView;
-import com.mikepenz.aboutlibraries.Libs;
-import com.mikepenz.aboutlibraries.LibsBuilder;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
@@ -499,27 +497,11 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
break;
case R.id.nav_about:
- Libs.ActivityStyle style;
- switch (Themes.getCurrentTheme()) {
- case DARK:
- case DARK_CONTRAST:
- style = Libs.ActivityStyle.DARK;
- break;
-
- default:
- style = Libs.ActivityStyle.LIGHT_DARK_TOOLBAR;
- break;
- }
CharSequence aboutCharSequence = getText(R.string.aboutText);
String aboutString = aboutCharSequence instanceof Spanned
? Html.toHtml((Spanned) aboutCharSequence)
: aboutCharSequence.toString();
- new LibsBuilder()
- .withActivityStyle(style)
- .withAboutIconShown(true)
- .withAboutVersionShown(true)
- .withAboutDescription(aboutString)
- .start(this);
+ startActivity(new Intent(this, AboutActivity.class));
break;
}
diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml
new file mode 100644
index 000000000..1a241ac78
--- /dev/null
+++ b/app/src/main/res/layout/activity_about.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/raw/keep.xml b/app/src/main/res/raw/keep.xml
new file mode 100644
index 000000000..018a3d8f9
--- /dev/null
+++ b/app/src/main/res/raw/keep.xml
@@ -0,0 +1,3 @@
+
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 328826518..3a6771785 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,12 +1,19 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
+ ext {
+ kotlin_version = '2.3.21'
+ }
repositories {
google()
mavenCentral()
+ gradlePluginPortal()
}
dependencies {
classpath 'com.android.tools.build:gradle:9.2.1'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlin_version"
+ classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:14.0.1"
}
}
diff --git a/gradle.properties b/gradle.properties
index 345e38e9e..b0dbc1158 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,9 +1,7 @@
-android.builtInKotlin=false
android.defaults.buildfeatures.resvalues=true
android.dependency.useConstraints=true
android.enableAppCompileTimeRClass=false
android.enableJetifier=true
-android.newDsl=false
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.r8.optimizedResourceShrinking=false
@@ -11,4 +9,5 @@ android.r8.strictFullModeForKeepRules=false
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.uniquePackageNames=false
android.useAndroidX=true
-android.usesSdkInManifest.disallowed=false
\ No newline at end of file
+android.usesSdkInManifest.disallowed=false
+org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
\ No newline at end of file