How to creat a task to show build failed message in the end?
I have tried
task.setEnabled(false)
but it shows BUILD SUCCESSFUL. I tried also
ant.fail('message')
It worked and stoped the tasks. But is there any function to show BUILD FAILED message instead of throwing an exception?
The way to programmatically fail a build is throw new GradleException("helpful message").
Related
I have an XCode project that builds with the legacy build system, but when using the new build system under xcode11 immediately fails with the err:
.. forcing incremental PIF cache clear after loading error: Required key 'productTypeIdentifier' is missing in StandardTarget dictionary
note: Using new build system
error: Build service could not start build operation: unknown error while handling message: MsgHandlingError(message: "no PIF transfer has been initiated")
I'm looking for any info that might help clarify this.
What is a 'StandardTarget dictionary'? Can I add the missing key directly? Or is this a consequence some other setting?
Are there any 'PIF transfer' experts out there?
Cannot even build in sidekick after a simple change
I created a new Core/TS project in Sidekick, I built the app and developed some stuff, but later I changed the icon to a nicer one (which requires a new build, no HMR for this type of change obviously), now I cannot build my app (cloud build, because I don't have Android Studio).
I checked the /main/assets/app/ and the icons were successfully changed there and they were existed.
What is happening? How do I fix this big issue? My patience bottle with all these critical errors even after simple changes is getting emptied.
I also tried "removing .cloud and folder directories", and clicking "clean cloud processes", adding "clean" option, etc...
But none worked.
I also updated the webpack.config.js file, with node_modules.bin\update-ns-webpack --configs
The file got successfully updated, but still did not solve the problem and I still cannot build.
Still after many hours cannot cloud build my app in sidekick. I also tried tns platform remove android, tns install, etc, etc... none worked out.
this is the error message:
[00:00:18.521] [WARN] Executing webpack failed with exit code 2.
[00:00:18.681] [ERROR] clean-webpack-plugin: /mnt/storage/builds/_/af8fe992d35e76b54f5523261a83dac973ffc9ed/5.3.4/5.3.1/Spread/platforms/android/app/src/main/assets/app/**/* has been removed.
Executing webpack failed with exit code 2.
'Build failed with error code 2'.
[19-06-10 19:13:56.767] Couldn't enable debugging for EP7333JKFA, Error: Couldn't enable debugging for EP7333JKFA
at Errors.fail (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:126:28)
at Errors.failWithoutHelp (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:136:21)
at LiveSyncService.<anonymous> (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:253:30)
at Generator.next (<anonymous>)
at C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:13:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:9:12)
at LiveSyncService.enableDebuggingCoreWithoutWaitingCurrentAction (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:250:16)
at LiveSyncService.enableDebuggingCoreWithoutWaitingCurrentAction (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\common\decorators.js:67:47)
at LiveSyncService.<anonymous> (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:290:25)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:10:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
OUTPUT 2
EDIT:
SOLVED
https://github.com/NativeScript/sidekick-feedback/issues/384#issuecomment-508028462
I know this isn't an answer, but it is happening to me, too. I am running Nativescript 5.4.1. I can build with webpack, but as soon as I try to run with AOT or Uglify, I can't build and the error message isn't very helpful.
Try to remove and add 'nativescript-dev-webpack'-plugin using nativescript-sidekick-GUI, this resolve my issue...
I'm trying to run Kotlin/Native v0.3 win32 sample by following the blog at https://blog.jetbrains.com/kotlin/2017/06/kotlinnative-v0-3-is-out/
I downloaded the x86-64 Windows zip file as instructed at the end of the blog.
I run kotlin-native-windows-0.3\samples>gradlew.bat and it
downloaded something and said 'BUILD SUCCESSFUL'. (I'm not sure if
this step is necessary)
2.1 But If I run kotlin-native-windows-0.3\samples>gradlew build
in this folder, I got some failures:
C:\Users\OO\Documents\kotlin-native-windows-0.3\samples>gradlew build
:concurrent:assemble UP-TO-DATE
:concurrent:check UP-TO-DATE
:concurrent:downloadKonanCompiler
:concurrent:genMessageChannelInteropStubs UP-TO-DATE
:concurrent:compileCpp FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':concurrent:compileCpp'.
A problem occurred starting process 'command './buildCpp.sh''
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Then I run kotlin-native-windows-0.3\samples\win32>build.bat and I
got another error.
C:\Users\OO\Documents\kotlin-native-windows-0.3\samples\win32>build.bat
exception: java.lang.IllegalStateException: Could not find "win32" in [C:\Users\OO\Documents\kotlin-native-windows-0.3\samples\win32, C:\Users\OO\.konan\klib, C:\Users\OO\DOCUME~1\KOTLIN~1.3\bin\..\klib].
at org.jetbrains.kotlin.backend.konan.library.KonanLibrarySearchPathResolver.resolve(SearchPathResolver.kt:71)
at org.jetbrains.kotlin.backend.konan.KonanConfig$librariesFound$2.invoke(KonanConfig.kt:70)
at org.jetbrains.kotlin.backend.konan.KonanConfig$librariesFound$2.invoke(KonanConfig.kt:34)
at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:130)
at org.jetbrains.kotlin.backend.konan.KonanConfig.getLibrariesFound(KonanConfig.kt)
at org.jetbrains.kotlin.backend.konan.KonanConfig.access$getLibrariesFound$p(KonanConfig.kt:34)
at org.jetbrains.kotlin.backend.konan.KonanConfig$libraries$2.invoke(KonanConfig.kt:77)
at org.jetbrains.kotlin.backend.konan.KonanConfig$libraries$2.invoke(KonanConfig.kt:34)
at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:130)
at org.jetbrains.kotlin.backend.konan.KonanConfig.getLibraries$backend_native_compiler(KonanConfig.kt)
at org.jetbrains.kotlin.backend.konan.KonanConfig.loadLibMetadata(KonanConfig.kt:90)
at org.jetbrains.kotlin.backend.konan.KonanConfig.<init>(KonanConfig.kt:80)
at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:66)
at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:56)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:93)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:46)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:90)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:68)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:34)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:160)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:151)
at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:169)
at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:166)
at org.jetbrains.kotlin.backend.konan.util.UtilKt.profileIf(util.kt:33)
at org.jetbrains.kotlin.backend.konan.util.UtilKt.profile(util.kt:28)
at org.jetbrains.kotlin.cli.bc.K2Native$Companion.main(K2Native.kt:168)
at org.jetbrains.kotlin.cli.bc.K2NativeKt.main(K2Native.kt:174)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:46)
I'm very new to Kotlin or Gradle world, I don't know if this is the way to compile the samples.
What additional packages should I install?
It can be easily solved by canceled the comments "rem call ..." in "build.bat"
I've tried rebuilding and cleaning all of my projects, but I keep getting the following error:
Error: Error initializing task ValidatePackageReferences: (MyProjectName.iOS)
It also appears with the Android project.
I've got everything up-to-date and have restarted Xamarin and my computer.
Has anyone else seen this?
I am getting the below error, while building a job in Jenkins. The error occurs while starting a view. So I know I need to create that view before starting it so that it wont error out.
But my query is where in Jenkins should I add these step to create a dynamic view even before starting it?
Building remotely on my_machine in workspace c:/hw/workspace/my_project_13.6
[my_project_13.6] $ cleartool startview username_my_machine_my_project_13.6
cleartool: Error: View tag not found: "username_my_machine_my_project_13.6".
FATAL: Base ClearCase failed. exit code=1
java.io.IOException: cleartool did not return the expected exit code. Command line="startview username_my_machine_my_project_13.6", actual exit code=1
at hudson.plugins.clearcase.HudsonClearToolLauncher.run(HudsonClearToolLauncher.java:120)
at hudson.plugins.clearcase.ClearToolExec.startView(ClearToolExec.java:913)
at hudson.plugins.clearcase.action.BaseDynamicCheckoutAction.startView(BaseDynamicCheckoutAction.java:115)
At what step is that cleartool startview been called. If that's a build task then add a command to create the dynamic view before the script is called.
Or you can try to create dependant jobs in jenkins and run your current jobs only once the 'create view' job is complete(I know it would be a small job, but this is just to fix the issue). To understand the error, we would need more info .