mastodon / mastodon-android

Official Android app for Mastodon
https://app.joinmastodon.org/android
GNU General Public License v3.0
1.62k stars 249 forks source link

Grishka AppKit Dependency #848

Open xypnox opened 3 weeks ago

xypnox commented 3 weeks ago

I tried setting up a local build but gradlew can't find the v1.3.0 of me.grishka.appkit:appkit:

% ./gradlew clean build --refresh-dependencies
> Task :mastodon:mergeAppcenterPrivateBetaNativeLibs FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mastodon:mergeAppcenterPrivateBetaNativeLibs'.
> Could not resolve all files for configuration ':mastodon:appcenterPrivateBetaRuntimeClasspath'.
   > Could not find me.grishka.appkit:appkit:1.3.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/me/grishka/appkit/appkit/1.3.0/appkit-1.3.0.pom
       - https://repo.maven.apache.org/maven2/me/grishka/appkit/appkit/1.3.0/appkit-1.3.0.pom
       - file:/home/xypnox/.m2/repository/me/grishka/appkit/appkit/1.3.0/appkit-1.3.0.pom
     Required by:
         project :mastodon

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 6s
4 actionable tasks: 3 executed, 1 up-to-date

The package version was changed recently to 1.3.0

https://github.com/mastodon/mastodon-android/blob/c5197975c5516091a7af3c4564a494f7cf4d220e/mastodon/build.gradle#L93

Also, downgrading to 1.2.2 gives me the errors:

> Task :mastodon:processAppcenterPublicBetaResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mastodon:processAppcenterPublicBetaResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     warn: removing resource org.joinmastodon.android:string/password_note without required default value.
     org.joinmastodon.android.mastodon-mergeAppcenterPublicBetaResources-9:/values/values.xml:1327: error: style attribute 'attr/appkitEmptyTextAppearance (aka org.joinmastodon.android:attr/appkitEmptyTextAppearance)' not found.
     org.joinmastodon.android.mastodon-mergeAppcenterPublicBetaResources-9:/values/values.xml:1429: error: style attribute 'attr/appkitEmptyTextAppearance (aka org.joinmastodon.android:attr/appkitEmptyTextAppearance)' not found.
     org.joinmastodon.android.mastodon-mergeAppcenterPublicBetaResources-9:/values/values.xml:1481: error: style attribute 'attr/appkitToolbarElevation (aka org.joinmastodon.android:attr/appkitToolbarElevation)' not found.
     org.joinmastodon.android.mastodon-mergeAppcenterPublicBetaResources-9:/values/values.xml:1482: error: style attribute 'attr/appkitToolbarBackground (aka org.joinmastodon.android:attr/appkitToolbarBackground)' not found.
     org.joinmastodon.android.mastodon-mergeAppcenterPublicBetaResources-9:/values/values.xml:1483: error: style attribute 'attr/actionBarIconTint (aka org.joinmastodon.android:attr/actionBarIconTint)' not found.
     error: failed linking references.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
% java --version
openjdk 17.0.11 2024-04-16
OpenJDK Runtime Environment (build 17.0.11+9)
OpenJDK 64-Bit Server VM (build 17.0.11+9, mixed mode, sharing)

% ./gradlew --version

------------------------------------------------------------
Gradle 8.5
------------------------------------------------------------

Build time:   2023-11-29 14:08:57 UTC
Revision:     28aca86a7180baa17117e0e5ba01d8ea9feca598

Kotlin:       1.9.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          17.0.11 (Oracle Corporation 17.0.11+9)
OS:           Linux 6.8.9-arch1-2 amd64

Perhaps the newer version was not published @grishka ?

grishka commented 3 weeks ago

Yes it is not published because publishing on Maven Central is irreversible, so I usually hold off doing that in case there are any yet-undiscovered bugs. This version in particular adds support for the predictive back gesture, which is a significant, compatibility-breaking behavior change.

Please stick to tagged releases. If you must use a pre-release version, you'll need to build https://github.com/grishka/appkit yourself and install it into your local Maven repository.