diff --git a/build.gradle b/build.gradle index ec57a9f1ac1..c048442e148 100644 --- a/build.gradle +++ b/build.gradle @@ -74,7 +74,6 @@ subprojects { // https://www.oracle.com/java/technologies/javase/11-relnote-issues.html#JDK-8190378 implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' - implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.5' implementation 'javax.annotation:javax.annotation-api:1.3.2' implementation group: 'javax.jws', name: 'javax.jws-api', version: '1.1' implementation group: 'javax.activation', name: 'activation', version: '1.1.1' diff --git a/chainbase/src/test/java/org/tron/common/math/MathsTest.java b/chainbase/src/test/java/org/tron/common/math/MathsTest.java deleted file mode 100644 index eaef30d8f51..00000000000 --- a/chainbase/src/test/java/org/tron/common/math/MathsTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.tron.common.math; - -import org.junit.Assert; -import org.junit.Test; - -public class MathsTest { - - @Test - public void testPow() { - boolean isJava8 = "1.8".equals(System.getProperty("java.specification.version")); - boolean isARM = "aarch64".equals(System.getProperty("os.arch")); - boolean isX87 = isJava8 && !isARM; - Maths.powData.forEach((key, value) -> { - double result = Maths.pow(key.a, key.b); - double result2 = StrictMath.pow(key.a, key.b); - double result3 = Math.pow(key.a, key.b); - Assert.assertEquals(Double.compare(result, value), 0); - Assert.assertNotEquals(Double.compare(result2, value), 0); - if (isX87) { - Assert.assertNotEquals(Double.compare(result3, result2), 0); - Assert.assertEquals(Double.compare(result3, value), 0); - } else { - Assert.assertEquals(Double.compare(result3, result2), 0); - Assert.assertNotEquals(Double.compare(result3, value), 0); - } - }); - } -} diff --git a/plugins/build.gradle b/plugins/build.gradle index f94bec7e18a..c1d2c3ebeb5 100644 --- a/plugins/build.gradle +++ b/plugins/build.gradle @@ -18,7 +18,20 @@ configurations { checkstyleConfig } -configurations.getByName('checkstyleConfig') { +jdepsReport { + sourceSets = ['main', 'test'] + configurations = ['testRuntimeClasspath'] + consoleOutput = false +} + +jdeprscanReport { + sourceSets = ['main', 'test'] + configurations = ['testRuntimeClasspath'] + forRemoval = true + release = JavaVersion.VERSION_17.getMajorVersion() +} + +configurations.named('checkstyleConfig') { transitive = false } @@ -48,7 +61,7 @@ checkstyleMain { source = 'src/main/java' } -task lint(type: Checkstyle) { +tasks.register('lint', Checkstyle) { // Cleaning the old log because of the creation of the new ones (not sure if totaly needed) delete fileTree(dir: "${project.rootDir}/app/build/reports") source 'src' @@ -90,7 +103,7 @@ jacocoTestReport { } def binaryRelease(taskName, jarName, mainClass) { - return tasks.create("${taskName}", Jar) { + return tasks.register("${taskName}", Jar) { baseName = jarName version = null from(sourceSets.main.output) { @@ -151,7 +164,7 @@ if (releaseBinary == 'true') { } } -task copyToParent(type: Copy) { +tasks.register('copyToParent', Copy) { into "../build/distributions" from "$buildDir/distributions" include "*.zip"