Commit d49f0148 authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

Switching to java 11 and gradle 7: first step

parent ff0879d0
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TTool" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="ALTERNATIVE_JRE_PATH" value="jbr-11" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="Main" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="-debug -proverif -experimental -config bin/config.xml" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="ttool" />
<envs />
<method>
<option name="PROGRAM_PARAMETERS" value="-debug -proverif -experimental -config bin/config.xml" />
<method v="2">
<option name="Make" enabled="true" />
<option name="BuildArtifacts" enabled="true">
<artifact name="dependencies" />
</option>
......
......@@ -12,7 +12,7 @@ ext {
subprojects {
apply plugin: 'java'
sourceCompatibility = 1.8
sourceCompatibility = 1.11
// version =
sourceSets {
......@@ -38,7 +38,8 @@ subprojects {
libsDirName = "${rootProject.absPath}/build"
task copyRuntimeLibs(type: Copy) {
from configurations.runtime
project.configurations.getByName("runtimeOnly").setCanBeResolved(true)
from configurations.implementation
from 'runtime'
into "${rootProject.absPath}/build"
}
......
......@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
......@@ -33,8 +33,9 @@ dependencies {
jar {
manifest {
project.configurations.getByName("implementation").setCanBeResolved(true)
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Class-Path': configurations.implementation.collect { it.getName() }.join(' '),
'Main-Class': 'GraphMinimize'
)
}
......
......@@ -15,21 +15,22 @@ sourceSets {
}
dependencies {
compile name: 'gs-core-2.0'
compile name: 'gs-ui-swing-2.0'
compile name: 'commons-io-2.5'
implementation name: 'gs-core-2.0'
implementation name: 'gs-ui-swing-2.0'
implementation name: 'commons-io-2.5'
compileOnly name: 'commons-codec-1.10'
compileOnly name: 'jsoup-1.8.1'
compile name: 'jautomata-core'
implementation name: 'jautomata-core'
compileOnly name: 'jna-3.3.0'
compile name: 'commons-math3-3.6.1'
compile name: 'jfreechart-1.6.0'
implementation name: 'commons-math3-3.6.1'
implementation name: 'jfreechart-1.6.0'
}
jar {
manifest {
project.configurations.getByName("implementation").setCanBeResolved(true)
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Class-Path': configurations.implementation.collect { it.getName() }.join(' '),
'Main-Class': 'GraphShow'
)
}
......
......@@ -12,18 +12,19 @@ sourceSets {
}
dependencies {
compile name: 'commons-codec-1.10'
implementation name: 'commons-codec-1.10'
compileOnly name: 'commons-io-2.5'
compileOnly name: 'jsoup-1.8.1'
compileOnly name: 'jna-3.3.0'
compile name: 'commons-math3-3.6.1'
compile name: 'jfreechart-1.6.0'
implementation name: 'commons-math3-3.6.1'
implementation name: 'jfreechart-1.6.0'
}
jar {
manifest {
project.configurations.getByName("implementation").setCanBeResolved(true)
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Class-Path': configurations.implementation.collect { it.getName() }.join(' '),
'Main-Class': 'launcher.Main'
)
}
......
......@@ -13,41 +13,42 @@ dependencies {
compileOnly name: 'opencloud'
compileOnly name: 'JavaPlot'
compileOnly name: 'derbynet'
compile name: 'commons-math3-3.6.1'
implementation name: 'commons-math3-3.6.1'
compileOnly name: 'commons-codec-1.10'
compileOnly name: 'commons-io-2.5'
compileOnly name: 'jsoup-1.8.1'
compileOnly name: 'gs-core-2.0'
compileOnly name: 'gs-ui-swing-2.0'
compile name: 'xercesImpl-2.12.0'
compile name: 'fontbox-2.0.19'
compile name: 'serializer-2.7.2'
compile name: 'xalan-2.7.2'
compile name: 'xml-apis-ext-1.3.04'
compile name: 'commons-logging-1.0.4'
compile name: 'xmlgraphics-commons-2.6'
compile name: 'batik-all-1.14'
compile name: 'xml-apis'
compile name: 'json-java'
compile name: 'fop'
compile name:'jautomata-core'
compile name:'com.microsoft.z3'
implementation name: 'xercesImpl-2.12.0'
implementation name: 'fontbox-2.0.19'
implementation name: 'serializer-2.7.2'
implementation name: 'xalan-2.7.2'
implementation name: 'xml-apis-ext-1.3.04'
implementation name: 'commons-logging-1.0.4'
implementation name: 'xmlgraphics-commons-2.6'
implementation name: 'batik-all-1.14'
implementation name: 'xml-apis'
implementation name: 'json-java'
implementation name: 'fop'
implementation name:'jautomata-core'
implementation name:'com.microsoft.z3'
compileOnly name: 'jna-3.3.0'
compile name: 'jgrapht-core-1.3.0'
compile name: 'jgrapht-ext-1.3.0'
compile name: 'jgrapht-io-1.3.0'
compile name: 'jgraphx-3.4.1.3'
implementation name: 'jgrapht-core-1.3.0'
implementation name: 'jgrapht-ext-1.3.0'
implementation name: 'jgrapht-io-1.3.0'
implementation name: 'jgraphx-3.4.1.3'
compile name: 'jfreechart-1.6.0'
implementation name: 'jfreechart-1.6.0'
}
jar {
manifest {
project.configurations.getByName("implementation").setCanBeResolved(true)
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Class-Path': configurations.implementation.collect { it.getName() }.join(' '),
'Main-Class': 'RunDSE'
)
}
......
......@@ -13,13 +13,14 @@ sourceSets {
}
dependencies {
compile name: 'jsoup-1.8.1'
implementation name: 'jsoup-1.8.1'
}
jar {
manifest {
project.configurations.getByName("implementation").setCanBeResolved(true)
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Class-Path': configurations.implementation.collect { it.getName() }.join(' '),
'Main-Class': 'RemoteSimulationControl'
)
}
......
......@@ -202,7 +202,7 @@ public class AttackTree extends AttackElement {
for (AttackerPopulation ap: populations) {
double d = ap.getTotalAttackers(this);
ret.add(new Double(d/ap.getTotalPopulation()));
ret.add(Double.valueOf(d/ap.getTotalPopulation()));
}
return ret;
......
......@@ -379,10 +379,10 @@ public class AvatarStateMachine extends AvatarElement {
Integer name = simplifiedElements.get(root);
if (name == null) {
if (root == this.startState)
simplifiedElements.put(root, new Integer(0));
simplifiedElements.put(root, Integer.valueOf(0));
else {
counter++;
simplifiedElements.put(root, new Integer(counter));
simplifiedElements.put(root, Integer.valueOf(counter));
}
}
} else {
......
......@@ -532,7 +532,7 @@ public class AVATAR2ProVerif implements AvatarTranslator {
for(AvatarBlock block: blocks) {
Map<AvatarStateMachineElement, Integer> simplifiedElements = block.getStateMachine ().getSimplifiedElements ();
if (simplifiedElements.get (block.getStateMachine ().getStartState ()) == null)
simplifiedElements.put (block.getStateMachine ().getStartState (), new Integer (0));
simplifiedElements.put (block.getStateMachine ().getStartState (), Integer.valueOf(0));
for (AvatarStateMachineElement asme: simplifiedElements.keySet ())
this.spec.addDeclaration (new ProVerifVar ("call" + ATTR_DELIM + block.getName() + ATTR_DELIM + simplifiedElements.get (asme), "bitstring", true));
......@@ -976,7 +976,7 @@ public class AVATAR2ProVerif implements AvatarTranslator {
// Generate a new process for every simplified element of the block's state machine
Map<AvatarStateMachineElement, Integer> simplifiedElements = ab.getStateMachine ().getSimplifiedElements ();
if (simplifiedElements.get (ab.getStateMachine ().getStartState ()) == null)
simplifiedElements.put (ab.getStateMachine ().getStartState (), new Integer (0));
simplifiedElements.put (ab.getStateMachine ().getStartState (), Integer.valueOf(0));
for (AvatarStateMachineElement asme: simplifiedElements.keySet ())
if (asme != null) {
......
......@@ -218,11 +218,11 @@ public class AUTGraph implements myutil.Graph {
s1 = s.substring(s.indexOf(',') + 1, s.length());
s1 = s1.substring(0, s1.indexOf(','));
s1 = Conversion.removeFirstSpaces(s1);
nbTransition = new Integer(s1).intValue();
nbTransition = Integer.valueOf(s1).intValue();
s2 = s.substring(s.indexOf(",") + 1, s.indexOf(')'));
s2 = s2.substring(s2.indexOf(",") + 1, s2.length());
s2 = Conversion.removeFirstSpaces(s2);
nbState = new Integer(s2).intValue();
nbState = Integer.valueOf(s2).intValue();
break;
}
}
......@@ -1202,11 +1202,11 @@ public class AUTGraph implements myutil.Graph {
if (st.isInitial()) {
//@SuppressWarnings("unchecked")
mapOfStates.put(st, new Integer(0));
mapOfStates.put(st, Integer.valueOf(0));
} else {
//@SuppressWarnings("unchecked")
mapOfStates.put(st, new Integer(cpt));
mapOfStates.put(st, Integer.valueOf(cpt));
cpt++;
}
}
......@@ -1316,7 +1316,7 @@ public class AUTGraph implements myutil.Graph {
b0.addState(st);
}
b0.computeHash();
allBlocks.put(new Integer(b0.hashValue), b0);
allBlocks.put(Integer.valueOf(b0.hashValue), b0);
AUTBlock b0Test = new AUTBlock();
......@@ -1325,7 +1325,7 @@ public class AUTGraph implements myutil.Graph {
}
b0Test.computeHash();
AUTBlock B0Ret = allBlocks.get(new Integer(b0Test.hashValue));
AUTBlock B0Ret = allBlocks.get(Integer.valueOf(b0Test.hashValue));
if (B0Ret == null) {
//TraceManager.addDev("ERROR: hash not working for blocks");
} else {
......
......@@ -202,7 +202,7 @@ public class CSVObject {
ArrayList<Integer> list = new ArrayList<>();
for (int i = 0; i < ints.length; i++) {
try {
list.add(new Integer(ints[i]));
list.add(Integer.valueOf(ints[i]));
} catch (NumberFormatException nfe) {
}
......
......@@ -151,7 +151,7 @@ public class ProVerifOutputAnalyzer {
if (isInTrace && (str.startsWith("A more detailed") || str.startsWith("Could not find")))
{
isInTrace = false;
resultTrace.finalize();
resultTrace.finalizeMethod();
continue;
}
else if (!isInTrace && str.startsWith("1. "))
......
......@@ -567,7 +567,7 @@ public class ProVerifResultTrace {
TraceManager.addDev("[DEBUG] unmatch: " + str);
}
public void finalize()
public void finalizeMethod()
{
this.finalizeStep();
}
......
......@@ -55,11 +55,11 @@ public class TMLRandomSequence extends TMLActivityElement {
public TMLRandomSequence(String _name, Object _referenceObject) {
super(_name, _referenceObject);
indexes = new Vector<Integer>();
indexes = new Vector<>();
}
public void addIndex(int index) {
indexes.add(new Integer(index));
indexes.add(index);
}
public void sortNexts() {
......@@ -78,7 +78,7 @@ public class TMLRandomSequence extends TMLActivityElement {
int i;
while (indexes.size() > 0) {
i0 = new Integer(1000);
i0 = 1000;
index = -1;
for (i = 0; i < indexes.size(); i++) {
if (indexes.elementAt(i).compareTo(i0) < 0) {
......
......@@ -5147,7 +5147,7 @@ public class GTURTLEModeling {
//TraceManager.addDev("got zooms");
if (zoomS != null) {
//TraceManager.addDev("Zoom found:" + zoomS);
double zoomV = new Double(zoomS);
double zoomV = Double.valueOf(zoomS);
if (zoomV != 0)
return zoomDiag/zoomV;
......
......@@ -757,7 +757,7 @@ public class TGUIAction extends AbstractAction {
//putValue(Action.MNEMONIC_KEY, new Integer(actions[id].MNEMONIC_KEY));
if (actions[id].MNEMONIC_KEY != 0) {
if (actions[id].hasControl) {
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].KEY, java.awt.event.InputEvent.CTRL_MASK));
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].KEY, java.awt.event.InputEvent.CTRL_DOWN_MASK));
} else {
if ((actions[id].MNEMONIC_KEY >= 37 && actions[id].MNEMONIC_KEY <= 40) || actions[id].MNEMONIC_KEY == KeyEvent.VK_DELETE) //handling for arrow and delete keys
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].MNEMONIC_KEY, 0));
......@@ -791,7 +791,7 @@ public class TGUIAction extends AbstractAction {
//putValue(Action.MNEMONIC_KEY, new Integer(actions[id].MNEMONIC_KEY));
if (actions[id].MNEMONIC_KEY != 0) {
if (actions[id].hasControl) {
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].KEY, java.awt.event.InputEvent.CTRL_MASK));
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].KEY, java.awt.event.InputEvent.CTRL_DOWN_MASK));
} else {
if ((actions[id].MNEMONIC_KEY >= 37 && actions[id].MNEMONIC_KEY <= 40) || actions[id].MNEMONIC_KEY == KeyEvent.VK_DELETE) //handling for arrow and delete keys
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].MNEMONIC_KEY, 0));
......
......@@ -121,7 +121,7 @@ public class AvatarInteractiveSimulationActions extends AbstractAction {
putValue(Action.LONG_DESCRIPTION, actions[id].LONG_DESCRIPTION);
//putValue(Action.MNEMONIC_KEY, new Integer(actions[id].MNEMONIC_KEY));
if (actions[id].MNEMONIC_KEY != 0) {
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].MNEMONIC_KEY, java.awt.event.InputEvent.CTRL_MASK));
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].MNEMONIC_KEY, java.awt.event.InputEvent.CTRL_DOWN_MASK));
}
putValue(Action.ACTION_COMMAND_KEY, actions[id].ACTION_COMMAND_KEY);
......
......@@ -145,7 +145,7 @@ public class InteractiveSimulationActions extends AbstractAction {
putValue(Action.LONG_DESCRIPTION, actions[id].LONG_DESCRIPTION);
//putValue(Action.MNEMONIC_KEY, new Integer(actions[id].MNEMONIC_KEY));
if (actions[id].MNEMONIC_KEY != 0) {
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].MNEMONIC_KEY, java.awt.event.InputEvent.CTRL_MASK));
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(actions[id].MNEMONIC_KEY, java.awt.event.InputEvent.CTRL_DOWN_MASK));
}
putValue(Action.ACTION_COMMAND_KEY, actions[id].ACTION_COMMAND_KEY);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment