Add line of text to resource on the final jar - json

So I am pretty new to Gradle and have to add line of text to resource on the final jar.
The file I am trying to add a line to is called v1_19_2.mixins.json and I am trying to add the line
"refmap": "v1_19_2-refmap.json",
to the 4th line. this should be added only when the build task is ran and should be done using the build.gradle file.
I tried to use ZipEntries and stuff but got bored.

Related

EvoSuit generate test for specific class with maven

Is it possible to configure in maven plugin,for which classes (like include/exclude by name pattern) JUNIT tests should be generated?
As i don't need tests for every class.
I managed to do it with command line but I need to do it in maven.
It isn't possible to do that, but you can use the -Dcuts and -DcutsFile command line arguments to generate test classes for 1..N classes.
Writing a small class that generates the class names for a given package structure is pretty trivial. You can then use the results to create a comma-delimited string that can be pasted into the file you associate with the -DcutsFile argument, e.g.:
mvn evosuite:generate evosuite:export -DcutsFile=c:\temp\cutsFile.txt
Where the contents of cutsFile.txt are:
com.foo.A, com.foo.B
Another way to generate the list of testable classes is to run the EvoSuite jar from the command line with the -listClasses and -target parameters and pipe the output to a file (Windows example below):
java -jar c:\evosuite\evosuite-master-1.0.5.jar -listClasses -target target/classes > c:temp\testableClasses.txt
From there you can just pick and choose the classes you'd want to add to the CUTs file or add them to the command line using the -Dcuts command line argument.

Visual Studio 2015 add JSON-File

I have a WebApplication MVC Porject. In the folder App_Data i want to add a json-file.
But Visual Studio does not suggest me to add a Json-File even not if i want to add a new Element.
How can I add a json? Just to use a normal text file and rename it as json?
You can find it under Web. Consider using the search-bar top right if you can't find something, if it does not show up in search you wont be able to do it.
JSON:
Yes, you would just change the file extension to .json
Adding Product.json file

CakePHP 2.x Project with unknown folder structure and database file, using EnvSwitcher Class

I have a new project that is using a plugin class called EnvSwitcher. I went to set up the database file and the database.php file is empty, except for two lines I have never seen:
App::uses('EnvSwitcher', 'Lib/EnvSwitcher');
EnvSwitcher::includeBaseFile(__FILE__);
The project does not load, only gets white screen. I tried adding the database connect info to the file, and nothing. Tried to even replace the two lines with regular database info, and still nothing. What is going on with this?
It's an Environment switching class. You are using the class here:
https://github.com/angelxmoreno/CakePHP-Environment-Switcher/blob/master/EnvSwitcher.php
Check in folder: Config/env/_default/
There should be copies of your config files there to modify.
If there is more than folder in: Config/envs, then there should be a copy of the files in each one to switch between environments.

ActionScript 3 get content from file when created

I need to make an RPM installer for my application, which runs a Java program that generates a file with some content and after the file is generated I want to pass it only once in my ActionScript code.
The generation of the file is fairly simple:
javac -classpath '.:../../lib/*' main/myProgram.java
java myProgram
The tricky part is here - how to pass the content of the file once it is generated to my ActionScript code? Is it possible and if yes - how can it be done?
Thanks.

Error trying to parse settings: No data in ~/.config/sublime-text-2/Packages/User/CTags.sublime-settings:1:1

I am using ubantu and trying to configure ctags on sublime text 2 for rails.
I am getting the above error message on opening my sublime text.
On re building ctags its completing within a flash without generating a .ctag file in the specified location.
My guess is that is an empty file right now. Open the file (possibly through another editor) and insert {}. The settings files are JSON objects. That just looks like it's failing the JSON parse.
You could run cat ~/.config/sublime-text-2/Packages/User/CTags.sublime-settings to see if there is anything in the file. If there is not you could freely delete it.
Though this error could be caused by a plugin that requires some configuration looking for its preferences file and failing.