anchoring base jdk version to 1.6+

This commit is contained in:
金戟 2020-10-22 21:05:17 +08:00
parent b6070ad24d
commit 8cc0b0313a
5 changed files with 37 additions and 9 deletions

View File

@ -10,7 +10,11 @@
<name>testable-agent</name>
<properties>
<java.version>1.6</java.version>
<project.compiler.level>1.6</project.compiler.level>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<asm.lib.version>8.0.1</asm.lib.version>
<plugin.compiler.version>3.8.1</plugin.compiler.version>
<plugin.jar.version>3.2.0</plugin.jar.version>
<plugin.shade.version>3.2.4</plugin.shade.version>
</properties>
@ -32,6 +36,16 @@
<build>
<finalName>testable-agent</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${plugin.compiler.version}</version>
<configuration>
<source>${project.compiler.level}</source>
<target>${project.compiler.level}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>

View File

@ -11,10 +11,10 @@
<name>testable-core</name>
<properties>
<plugin.compiler.version>3.8.1</plugin.compiler.version>
<plugin.resources.version>3.1.0</plugin.resources.version>
<java.version>1.6</java.version>
<project.compiler.level>1.6</project.compiler.level>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.compiler.level>1.7</project.compiler.level>
<plugin.compiler.version>3.8.1</plugin.compiler.version>
</properties>
<dependencies>

View File

@ -19,9 +19,9 @@ import java.lang.reflect.Modifier;
public class EnableTestableTranslator extends BaseTranslator {
private final String sourceClassName;
private final ListBuffer<Name> sourceClassIns = new ListBuffer<>();
private final ListBuffer<String> privateOrFinalFields = new ListBuffer<>();
private final ListBuffer<String> privateMethods = new ListBuffer<>();
private final ListBuffer<Name> sourceClassIns = new ListBuffer<Name>();
private final ListBuffer<String> privateOrFinalFields = new ListBuffer<String>();
private final ListBuffer<String> privateMethods = new ListBuffer<String>();
private final PrivateAccessStatementGenerator privateAccessStatementGenerator;
public EnableTestableTranslator(String pkgName, String testClassName, TestableContext cx) {

View File

@ -11,7 +11,7 @@ class StringUtilTest {
@Test
void should_able_to_join_string() {
List<String> list = new ArrayList<>(4);
List<String> list = new ArrayList<String>(4);
list.add("a");
list.add("b");
list.add("c");

View File

@ -9,8 +9,12 @@
<url>http://maven.apache.org</url>
<properties>
<java.version>1.8</java.version>
<testable.version>0.2.0-SNAPSHOT</testable.version>
<java.version>1.6</java.version>
<project.compiler.level>1.6</project.compiler.level>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<plugin.compiler.version>3.8.1</plugin.compiler.version>
<maven.plugin.version>3.6.0</maven.plugin.version>
</properties>
<dependencies>
@ -39,10 +43,20 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${plugin.compiler.version}</version>
<configuration>
<source>${project.compiler.level}</source>
<target>${project.compiler.level}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
<version>${maven.plugin.version}</version>
</plugin>
</plugins>
</build>