VSTS Android Continuous integration build failed DexGuard license not found - android

I'm actually working on a CI/CD using VSTS as server/git repo. I've configured the build task as showed on the website to build an android apk.
Keystores and all the data required as parameters on Build tasks are set but when I queued a Build task manually it crashes on the gradlew build module with the error:
Can't find a DexGuard license file.
You should place your license file dexguard-license.txt
1) in a location defined by the Java system property 'dexguard.license',
2) in a location defined by the OS environment variable 'DEXGUARD_LICENSE',
3) in your home directory,
4) in the class path, or
5) in the same directory as the DexGuard jar (not working in combination with Gradle v3.1+).
:app:dexguardXXXXXXXX FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:dexguardXXXXXXXX'.
java.io.IOException: Please check your DexGuard license (see build log for details).
But the license file is inckuded on the project and all paths on gradle properties are set correctly.
Anyone knows how to include or add the license file to VSTS in order to find the file at build time?

Related

unable to find project exploded aar

We have simple composite gradle build with android project and a library project. We are getting the following error from the build
> Task :kds-android-studio:lintAnalyzeDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':kds-android-studio:lintAnalyzeDebug'.
> unable to find project exploded aar for /Users/dean/workspace/tray/monorepo/android/libraries/tray-lib-android-studio :
In the build file, we have this line to pull in the artifact(per composite builds)
implementation 'com.tray.android.lib:tray-lib-android-studio'
In the settings.gradle file, we have this(per composite builds)
includeBuild '../../libraries/tray-lib-android-studio'
I have no idea what an aar file is. Any direction on debugging this further would be great? (I am mostly guessing right now and google doesn't seem to have any results on lintAnalyzeDebug and "unable to find project exploded aar".
I see an aar file fro debug and release in the tray-lib-android-studio project. Where is the main gradle project searching for 'exploded aar' and I wonder if I can just hack a target before the one that fails to explode the library aar in a good location to get this passing?

Gradle build failure when packaging GooglePAD asset packs in Unreal Engine

I have followed this guide to implement the GooglePAD plugin in UE 4.27, but I'm met with the following error when I try to package the project for the second time (first time generates the asset packs):
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:assetPackDebugPreBundleTask'.
> Could not resolve all task dependencies for configuration ':app:assetPackFiles'.
> Could not resolve project :assetpacks:on-demand:OnDemandPack.
Required by:
project :app
> Project :app declares a dependency from configuration 'assetPackFiles' to configuration 'packElements' which is not declared in the descriptor for project :assetpacks:on-demand:OnDemandPack.
I see that there is a similar question here, but their solution doesn't seem to apply to me since I'm certain my folders are properly named. This happens with all 3 of my on-demand packs. The build.gradle file inside the asset pack folders is exactly the same as the one included in the guide, though I have tried just writing the pack names as shown here to no avail.
What should I do to build successfully with this plugin?

Flutter: installing dependencies on code magic failing

I'm trying to create automatic tests for my flutter project and I'm using codemagic for this. https://codemagic.io Anyways, everything works fine on my local machine; however, when I try to run it on codemagic it fails on installing dependencies. Here's part of the output for where it's failing:
FAILURE: Build failed with an exception.
* Where:
Script '/Users/builder/programs/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 200
* What went wrong:
A problem occurred configuring project ':path_provider'.
> Failed to notify project evaluation listener.
> Could not get unknown property 'android' for project ':path_provider' of type org.gradle.api.Project.
> Could not find method debugProvided() for arguments [file collection] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
I've done some searching related to these errors. I'm seeing a few possible solutions such as upgrading gradle version and make a few adjustments in my files. However, none of the problems pertain to my problem (codemagic) and the solutions generally aren't working. The solutions I was following was they were running on their local machine and they get the error. Mine works locally, but not on the cloud testing environment. Any ideas? (Let me know if there are certain files I should post) Thanks!

How to get gradle build type when building Android application

I have a gradle build file which has Debug and Release configurations.
During the build, I execute a task in which I need the build type. I can send arguments to the script file, but I don't know how I can get the build type in the gradle task which is running.

Build debug configuration from the command line

When I run /gradlew :android:tasks, the output includes
Rules
-----
Pattern: clean<TaskName>: Cleans the output files of a task.
Pattern: build<ConfigurationName>: Assembles the artifacts of a configuration.
Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts belonging to a configuration.
(Note: my app's module is named android rather than the default app.)
But when I do ./gradlew :android:buildDebug, I get the following error:
* What went wrong:
Task 'buildDebug' not found in project ':android'.
Besides the default debug and release build configurations, I also have two flavors declared in build.gradle. How do I determine what are valid replacements for <ConfigurationName> in the instructions given by /gradlew :android:tasks?

Categories

Resources