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

build of v1.1.30 fails claiming outdated Kotlin Gradle plugin #1974

Open
IzzySoft opened this issue Nov 14, 2024 · 2 comments
Open

build of v1.1.30 fails claiming outdated Kotlin Gradle plugin #1974

IzzySoft opened this issue Nov 14, 2024 · 2 comments
Labels
needs follow up Further information is requested

Comments

@IzzySoft
Copy link

I've tried to build Obtainium from source to check for Reproducible Builds, but the build failed:

BUILD FAILED in 7m 35s
Running Gradle task 'assembleRelease'...                          456.5s

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin.                       │
│ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then   │
│ update the                                                                                   │
│ version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of  │
│ /home/runner/work/Obtainium/Obtainium/android/settings.gradle.                               │
│                                                                                              │
│ Alternatively (if your project was created before Flutter 3.19), update                      │
│ /home/runner/work/Obtainium/Obtainium/android/build.gradle                                   │
│ ext.kotlin_version = '<latest-version>'                                                      │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1

Build recipe used, orienting on your .github workflow:

build:
  - sed -r '/signingConfigs.release/d' -i android/app/build.gradle
  - export PUB_CACHE=$(pwd)/.pub-cache
  - .flutter/bin/flutter config --no-analytics
  - .flutter/bin/flutter pub get
  - .flutter/bin/flutter build apk --release --split-per-abi --target-platform="android-arm"

Did I get something wrong – or do you have a clue what might need fixing? Thanks in advance!

@ImranR98
Copy link
Owner

Hmm, not sure what changed - I haven't modified anything related to the build. I see that F-Droid does have the latest version so it looks like they were able to create a reproducible build.

@ImranR98 ImranR98 added the needs follow up Further information is requested label Nov 15, 2024
@IzzySoft
Copy link
Author

Thanks for your swift reply, Imran! F-Droid builds a different flavor:

      - .flutter/bin/flutter build apk --release --split-per-abi --target-platform="android-arm"
        --flavor fdroid -t lib/main_fdroid.dart

I didn't try the fdroid flavor and neither the -t. Thanks to your pointer to F-Droid's build I've noticed having missed the transistor-background-fetch dependency – but even with that integrated, I still get the above error, also with v1.1.31 now. Very strange, as F-Droid's builder runs on Debian bookworm with OpenJDK-17, and that's what I've configured for Obtainium here as well.

In android/settings.gradle, you've defined id "org.jetbrains.kotlin.android" version "1.8.10" apply false – that's a version from 2/2023. Recent version now would be 2.0.21. As F-Droid uses their own gradle, they might have replaced that (their recipe doesn't tell such things). Are you really building against 1.8.10?

What's even more strange: I've tried a last time with 1.8.10 replaced by 2.0.21, and get the very same error. Now I'm rather clueless…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs follow up Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants