provide apk path to gradle assembleRelease crashlyticsUploadDistributionRelease - android

I am trying to do Beta distributions with Gradle.
The following command should do, mentioned here.
gradle assembleRelease crashlyticsUploadDistributionRelease
But my signed apk is not in default folder app/build/outputs/apk/release/.
This is placed in some other folder, let's say /deploy/apk/.
How to let the
gradle task(crashlyticsUploadDistributionRelease) know apk path? Is there any way in command line option/parameter to specify input apk path?
Regards
Annada

Mike from Fabric here. Use
ext.betaDistributionApkFilePath = "path to the universal split APK"
in your specific flavor or variant, to use the APK in the path that you've specified.

Related

React Native -PreactNativeArchitectures=x86 always builds all ABIs. How to build only one?

I created a new react-native project with:
npx react-native init foo
Then In foo/android I ran:
./gradlew clean bundleRelease -PreactNativeArchitectures=x86
I would expect it to create a .aab file that only contains x86 architecture, but it seems it always has all the architecture ABIs? Looking inside the .aab file it has all the folders:
Also if I run ./gradlew clean bundleRelease
I get the exact same size .aab file with the exact same folder structure, again with all architectures included.
Is -PreactNativeArchitectures bugged or am I using it wrong? How do I only create one architecture for a release bundle and how do I know it's working? Currently -PreactNativeArchitectures seems to be completely ignored.
Got an answer from Cortinico in Github: https://github.com/facebook/react-native/issues/34902
Turns out ABI split are not supported by .aab files. One should build .apk file instead with:
./gradlew clean assembleRelease -PreactNativeArchitectures=x86
Also need to set the following to true in android/app/build.gradle
def enableSeparateBuildPerCPUArchitecture = true

How to rename and achieve app-release.aab when generate signedbundle on Gradle AndroidStudio

How to rename and achieve app-release.aab when generate signedbundle on Gradle AndroidStudio
Only achieve build variant release and named it with versionName(which is a combine of buildCount+data/time)
Normally my debug .aab path is
app/build/outputs/bundle/debug/app-debug.aab
my release .aab path is
app/release/app-release.aab
I wish to achieve each app-release.aab
at app/release/achieve/app-release.aab
Try some several stuff but none work for me... or I am just a stupid
I have a problem with $buildDir since my release path is not in $buildDir
Do we have something like $projectDir?
How to use productFlavors for android aab bundles
How To change Android App Bundles name (app.aab) to reflect App version and build type
https://gist.github.com/wilik16/ebba3fc09cc78c8d86780db807fcb48c
https://developer.android.com/guide/app-bundle?
How to change the generated filename for App Bundles with Gradle?

How to build Android Archive Library(AAR) with Android Build Tools?

I want to build aar files but I dont have Android Studio as my computer cannot run it.
How to build it from command line using the raw build tools; no gradle included?
The steps to build apk are:
generate R.java file with (aapt).
compile src files including R.java with (javac)
dex classes with (dx)
package, sign, align.
I understand that aar manifest(s) are not compiled to binary format. Thus the first step may not work when creating aar libs.
Please, I am begging, how to, the steps to creating with the build tools.
./gradlew <moduleName>:bundle<build_variant>Aar
//for example
./gradlew app:bundleReleaseAar

Specifying output location when assembling an Android project with Gradle via Terminal?

I'm trying to automate the build and upload process for a signed APK of an Android app without using Android Studio, so I'm running everything in Terminal. The first command is:
./gradlew assembleRelease
Which generates an unsigned, unaligned APK in the /APP NAME/build/outputs/apk folder. However, since APP NAME won't be the same for every app, I can't just hard code the location of the output file into the next step of signing it. Are there any arguments I can use with the gradlew command to specify an output directory and file name of my choice?
There is no such command to specify the output.But you can write a script to make this possible.As you have got the /build/outputs/app-release.apk, you can copy and rename it to everywhere you want.
you can dynamically append some script to that build file(build.gradle) to set the buildDir of any project.
for example:
allprojects {
buildDir = System.properties['user.home']+"/"+project.name;
}

How to put compiled apk to jenkins job artifacts?

I need to copy compiled apk file to job artifats to be able to download it directly from page of job if it was successful.
Now i have compiled apk file in folder build/apk/MyProject-release.apk
I'm using Gradle as a build tool.
There is a post build action for this. Just configure "archive the artifacts" with the path from your question. Nothing else needs to be done.

Categories

Resources