-
Notifications
You must be signed in to change notification settings - Fork 10
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
Failed to build #34
Comments
Thanks, I'll take a look. |
Found something, @sun-jiao? |
I'll fix the build on the newest flutter and use a fixed version in the script in the next week. |
@IzzySoft I've updated the android gradle version and flutter dependencies. And I've added a fixed number (same as my local version) in the GitHub actions script. Could you have a try and tell me the result? |
Thanks! That builds fine! Now, as the background is "reproducible builds" (see initial post): could you provide me an APK you've build from that commit (d2e5b8e) so I can have them compared by our builder? |
HI, which version do you want? universal? or split per abi? |
|
I am not familiar with reproducable build. So I don't know if different signatures affect the comparison of files. |
I don't know where you built this APK, but obviously not from inside the git repo, as
So I cannot check this as I have no clue which commit I should build, sorry. And as our builders build from inside the git tree, they'd have the correct info there… OK, assuming you've built from the latest commit (d2e5b8e) and I suggested above, and simply removing https://github.com/sun-jiao/flut-renamer/blob/main/android/app/build.gradle#L27-L34 if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
def _storeFile = file(System.getenv("KEYSTORE") ?: keystoreProperties["storeFile"])
def _storePassword = System.getenv("KEYSTORE_PASSWORD") ?: keystoreProperties["storePassword"]
def _keyAlias = System.getenv("KEY_ALIAS") ?: keystoreProperties["keyAlias"]
def _keyPassword = System.getenv("KEY_PASSWORD") ?: keystoreProperties["keyPassword"] If the file does not exist, you cannot read from it. And if those environment variables are not set, it fails. So maybe the last for lines should go into an "elseif" branch checking if the `KEYSTORE' variable is set, or something alike? So I created a dummy
Still crashes at line 31: "path may not be null or empty string. path='null'" (maybe Flutter considers
(it's all dummies, the process won't sign anyway). That builds now, but the resulting APK is much different from yours, already bigger even before signing. It contains a lot of files your APK does not have. And while the APK from my build e.g. clearly states
No, that's taken care for. We build an unsigned APK, then use |
I don't understand. It would be understandable if it was missing some files that my apk has, which could be attributed to gitignore. Can you share your apk with me? I will check when possible. |
Sure. Let me share the recipe as well, so you know how I've built: build:
- rm -rf .git
- sed -r '/signingConfigs.release/d' -i android/app/build.gradle
- export KEYSTORE=/dev/null KEYSTORE_PASSWORD=storePass KEY_ALIAS=keyAlias KEY_PASSWORD=keyPass
- FLUTTER_VERSION="$(sed -rn 's/\s*flutter-version:\s*([0-9.])/\1/p' .github/workflows/main.yml | head -n 1)"
- git clone -b $FLUTTER_VERSION https://github.com/flutter/flutter
- 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-arm64
- mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk /outputs/unsigned.apk (just remove the To check for RB, ideally you build from a (freshly checked out) git tree (of course without the |
I did not find a reason. May be due to the different android sdk and ndk? |
I went by your workflow and use OpenJDK-17 (zulu is not possible here; but if that's the culprit, you could try switching to "temurin" – or "oracle", which is supposed to be OpenJDK but I could not yet confirm it). Your workflow does not specify any NDK; the
I have no idea how you build the APK. But as your Hence the "first basic rule" of our hints on reproducible builds: always build from a clean tree at the commit the tag points to. "clean" means neither local modifications, nor any artifacts remaining from previous builds. And "commit" implies a git tree 😉 So maybe you can perform a |
I tried building the app from source, going by the steps in the workflow:
But the build fails when it invokes gradle:
As you can see, I even reflected the Github environment with the home and repo directories. Any hints what I might have missed?
Btw, instead of specifying a "moving target" like
stable
, could you maybe add the flutter version you use as git submodule here, or at least specify it inpubspec.yaml
?That would help reproducing a build even months later (and yes, the reason I try to build your app is Reproducible Builds – see Reproducible Builds, special client support and more at IzzyOnDroid).
Thanks in advance for your help!
The text was updated successfully, but these errors were encountered: