Skip to content
Draft
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Kotlin
*.kotlin_module
.kotlin/

#JVM
*.hprof

19 changes: 18 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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'
}
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@
</intent-filter>
</activity>

<activity android:name="fr.gaulupeau.apps.Poche.ui.AboutActivity" />

<receiver
android:name="androidx.media.session.MediaButtonReceiver"
android:exported="true">
Expand Down
19 changes: 19 additions & 0 deletions app/src/main/java/fr/gaulupeau/apps/Poche/ui/AboutActivity.java
Original file line number Diff line number Diff line change
@@ -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
}
}
10 changes: 10 additions & 0 deletions app/src/main/java/fr/gaulupeau/apps/Poche/ui/AboutLibsHelper.kt
Original file line number Diff line number Diff line change
@@ -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()
}
}
20 changes: 1 addition & 19 deletions app/src/main/java/fr/gaulupeau/apps/Poche/ui/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.compose.ui.platform.ComposeView
android:id="@+id/compose_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</FrameLayout>
3 changes: 3 additions & 0 deletions app/src/main/res/raw/keep.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@raw/aboutlibraries" />
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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"
}
}

Expand Down
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
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
android.r8.strictFullModeForKeepRules=false
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.uniquePackageNames=false
android.useAndroidX=true
android.usesSdkInManifest.disallowed=false
android.usesSdkInManifest.disallowed=false
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g