How to use Acra in release build only? - acra

I am trying to use http://www.acra.ch/ in my Android app.
How can I make it such that ACRA is used only in the release build and not in the debug builds.
I would have to set dependencies accordingly and have my ApplicationController(extends Application) class be configured accordingly.
How to do both? i.e. How to add a dependency for release only and also how to configure my ApplicationController(extends Application) class be configured?
I should mention that I am using my ApplicationController(extends Application) class for some functionality of the app.

Just don't initialize Acra in the debug build:
if(!BuildConfig.DEBUG) Acra.init(this);
If you want to exclude the dependency in debug build, use releaseCompile

Related

Service Fabric VSTS Task weird behavior

I have a CD task setup for each of the 4 services in Azure Service Fabric using VSTS. Following is the configuration for all 4 tasks (except they point to different folders for different services) :
Problems :
1.For the first two applications, even though I have checked "Skip upgrade for same Type and Version", I am noticing that the task still removes the application, unregisters the type and redoes it for the same application type and version. Here are the sample logs :
2018-01-24T02:48:36.6728272Z Overriding application parameter file specified in publish profile with 'd:\a\r1\a\drop\retail\amd64\RIPP\Deploy\PublishEventApplication\ApplicationParameters\DEV.xml' specified in the VSTS task.
2018-01-24T02:48:39.4305864Z An application with name 'fabric:/PublishEvent' already exists in the cluster with application type 'PublishEvent' and version '6.00.9810c873d83e992c104fdcfb125916caa718500a.0'. Removing it.
2018-01-24T02:48:43.9333176Z Remove application instance succeeded
2018-01-24T02:48:44.3244542Z Application type 'PublishEvent' and version '6.00.9810c873d83e992c104fdcfb125916caa718500a.0' was already registered with the cluster, unregistering it...
2018-01-24T02:48:48.8107130Z Unregister application type succeeded.
2018-01-24T02:48:48.8153978Z Copying application to image store...
2018-01-24T02:48:53.7676773Z Upload to Image Store succeeded
2018-01-24T02:48:53.7694089Z Registering application type...
2018-01-24T02:49:05.0363332Z Register application type succeeded
2018-01-24T02:49:05.0397398Z Removing application package from image store...
2018-01-24T02:49:05.3268514Z Remove application package succeeded
2018-01-24T02:49:05.3283533Z Creating application...
2.For the next two applications, the deployment fails with the following error :
2018-01-24T02:49:46.7483127Z Overriding application parameter file specified in publish profile with 'd:\a\r1\a\drop\retail\amd64\RIPP\Deploy\StreamReservoirApplication\ApplicationParameters\DEV.xml' specified in the VSTS task.
2018-01-24T02:49:48.2340310Z ##[error]An application with name 'fabric:/streamreservoir' already exists, its type is 'streamreservoir' and version is '6.00.7af146b1e9f1084401198b96d7eaf0cacec455f8.0'. You must first remove the existing application before a new application can be deployed or provide a new name for the application.
My assumption is that in case of all the four services :
Deployment should be skipped since the application type, name and version are the same.
If the version is different, the application should be upgraded (not removed and added again).
And finally, only if name and type is different then old one should be removed and new one should be added.
Try checking 'Override all publish profile upgrade settings' to configure upgrade settings.
Or, as you said:
The other option is to use the settings directly in the publish profiles. So simply checking "Skip upgrade for same type and version" doesn't do anything unless you have upgrade settings either overridden or in the publish profiles

Initializing Fabric on multiple targets

I have a module layer (embeds a framework) within my application to serve as a generic logging service to several services like Fabric, Mixpanel etc.
This module has a target dependency with the main app target.
I am initializing Fabric in the main app target's AppDelegate and later making calls to the Module layer for sending custom logs of this sort:
`CLSLogv("%#", getVaList("Some Log"))`
This however does not work unless I explicitly initialize Fabric in the Module layer
`Fabric.with([Crashlytics.self()])`
(The same way I've done it in the AppDelegate.)
I have NOT added a run script phase for Fabric in the Module target.
My question is, is this needed really since the module is a target dependency to the main app target and it already initializes Fabric in its app delegate?
If it is needed, is this going to cause any issues?

How to create a UWP Package that`s shipping Microsoft.NET.CoreRuntime.1.0 with it

I`m struggling with the following issue:
I try to deploy my uwp app with a Mobile Device Management System (MobileIron). it's only accepts .appxbundle, no .appxupload files. When i try to install/deploy the app on a device, i get the error
Can not install package XY because the package xy has a dependency to Microsoft.NET.CoreRuntime.1.0. This package is needed for the installation. Deploy this Framework together with your package
(my custom translation ;) )
The problem is, I dont know how to create a package, that's shipping the needed CoreRuntime within. When i create a DEBUG Package, i get a appxbundle and a folder with the missing CoreRuntime.appx, but only the powershell script is shipping the CoreRuntime Framework to the Device, not the bundle itself.
When i create a RELEASE Package, it`s running agains .NET Native, in this case i have no CoreRuntime...
Hope i explained my problem good enought and someone can help me or give me a hind.
You need to enable .NET Native, From your Project Properties:
Make sure that your configuration is for Release. And check
Compile with .NET Native tool chain
and
Optimize code
finally make sure to create your packages from Store->Create App Packages. With the following configurations:

Logging in Talend ESB

We had a web service developed in Talend and deployed in TAC(Talend runtime). Service is working fine on the local system but not after the deployment.We had tried various methods to debug it like placing the logger component and putting logging mechanism in Java component of Talend but those messages are not populating in the log file.Please suggest.
Talend Enterprise 5.6 comes with log4j logging. (It can be enabled in the project settings.) Maybe open studio has this feature as well.
If you activate that and start the logserver (based on Kibana / Logstash) you could have a web interface that shows the log messages in real-time, across all the deploys you have.
We're using this approach for development and some production projects. It tells you all the SQL-s connection details, execution times, records fetched, etc..
In TAC you should see the same logs if you click on the magnifier button on the corresponding job on Job Conductor tab. In case if it's empty, check the log4j setting in File->Edit Project Properties->Log4J, and make sure that the default CONSOLE appender is enabled. Also try to build the project manually, and check the log4j.properties in the built zip file.
Finally check the log level at the job properties on TAC->Job Conductor, and make sure it set to the right level.

How enable production mode in GWT 2.7 application

I would like to deploy my GWT 2.7 application on my server through gwt-maven-plugin and jenkins. But, after compile process, when I launch my application, I've this error message :
Couldn't load APPLICATION_NAME from Super Dev Mode
server at http://MY_IP:9876.
Please make sure this server is ready.
Indeed, the super dev mode is enabled by default since 2.7. So, how disable it to use production mode ?
Ok thank you very much for your comment. Indeed, my problem concerned the *.nocache.js and *.devmode.js files. I started my project (my first one in GWT) in 2.6 version and these files were created (by dev and super-dev-mode) and versionned by my fault. So, when my jenkins deployed my project, it used these files so even if I did mvn clean before deploy it had no effect.
So, I removed these files from my project and I did a mvn clean install before deploy to fix my issue.