From 7fb5c254f23a432d3ff78f4431c0b8d5ed0981bb Mon Sep 17 00:00:00 2001 From: Eric Bruneton Date: Sat, 31 Mar 2018 13:24:10 +0200 Subject: [PATCH] Fix the build and Eclipse import for Windows (case insensitive, different line endings, etc). --- .../test/java/org/objectweb/asm/util/TextifierTest.java | 7 +++++-- build.gradle | 9 ++++++--- settings.gradle | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/asm-util/src/test/java/org/objectweb/asm/util/TextifierTest.java b/asm-util/src/test/java/org/objectweb/asm/util/TextifierTest.java index 053c78d0..e010c616 100644 --- a/asm-util/src/test/java/org/objectweb/asm/util/TextifierTest.java +++ b/asm-util/src/test/java/org/objectweb/asm/util/TextifierTest.java @@ -35,6 +35,7 @@ import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; import java.io.StringWriter; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; @@ -121,8 +122,10 @@ public class TextifierTest extends AsmTest { String expectedText = new String( - Files.readAllBytes( - Paths.get("src/test/resources/" + classParameter.getName() + ".txt"))); + Files.readAllBytes( + Paths.get("src/test/resources/" + classParameter.getName() + ".txt")), + StandardCharsets.UTF_8) + .replace("\r", ""); assertEquals(expectedText, stringWriter.toString()); } } diff --git a/build.gradle b/build.gradle index 76165395..fccbb47d 100644 --- a/build.gradle +++ b/build.gradle @@ -226,9 +226,9 @@ configure(subprojects.findAll { it.provides }) { classpath configurations.sigtest main 'com.sun.tdk.signaturetest.Main' args 'Test', '-ApiVersion', version, '-Backward', '-Static', '-Mode', - 'bin', '-Classpath', "${System.env.JAVA_HOME}/jre/lib/rt.jar:" + - sourceSets.main.output.classesDirs.asPath, '-FileName', f, - '-Out', outputs.getFiles()[0], '-Package' + 'bin', '-Classpath', "${System.env.JAVA_HOME}/jre/lib/rt.jar" + + File.pathSeparator + sourceSets.main.output.classesDirs.asPath, + '-FileName', f, '-Out', outputs.getFiles()[0], '-Package' args provides // The exit value is not 0 in case of success, but 95... ignoreExitValue true @@ -271,6 +271,9 @@ configure(subprojects.findAll { it.provides }) { // Apply the SonarQube plugin to monitor the code quality of the project. // Use with 'gradlew sonarqube -Dsonar.host.url=https://sonarqube.ow2.org'. apply plugin: 'org.sonarqube' + sonarqube { + properties { property 'sonar.projectKey', "ASM:${project.name}" } + } // Add a task to generate a private javadoc and add it as a dependency of the // 'check' task. diff --git a/settings.gradle b/settings.gradle index 63daffd9..2a5903bb 100644 --- a/settings.gradle +++ b/settings.gradle @@ -26,7 +26,7 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF // THE POSSIBILITY OF SUCH DAMAGE. -rootProject.name = 'ASM' +rootProject.name = 'root' include( 'asm', -- GitLab