From 7617980f3d803a6a9b189603606174a30347fb5f Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Wed, 27 Oct 2021 13:54:01 +0200 Subject: [PATCH 1/3] chore: switch to javac compiler --- build.gradle | 31 +++---------------------------- docs/Note-for-developers.md | 23 +---------------------- 2 files changed, 4 insertions(+), 50 deletions(-) diff --git a/build.gradle b/build.gradle index ebc729080..c755722d6 100644 --- a/build.gradle +++ b/build.gradle @@ -16,16 +16,6 @@ repositories { mavenCentral() } -configurations { - ecj - lombok -} - -dependencies { - ecj 'org.eclipse.jdt:ecj:3.26.0' - lombok 'org.projectlombok:lombok:1.18.22' -} - java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 @@ -33,25 +23,10 @@ java { withSourcesJar() } -compileJava { - def ecjJar = configurations.ecj.singleFile - def lombokjar = configurations.lombok.singleFile - - options.fork = true - options.fork executable: 'java', jvmArgs: [ '-javaagent:'+lombokjar.path+'=ECJ', '-jar', ecjJar.path, '-cp', lombokjar.path] - options.define compilerArgs: [ - '-encoding', 'utf-8', - // https://www.ibm.com/support/knowledgecenter/SS8PJ7_9.7.0/org.eclipse.jdt.doc.user/tasks/task-using_batch_compiler.htm - '-warn:-unused,-unchecked,-raw,-serial,-suppress', - ] - - // https://github.com/gradle/gradle/issues/12904 - options.headerOutputDirectory.convention(null) -} - dependencies { - compileOnly('org.projectlombok:lombok:1.18.22') - annotationProcessor('org.projectlombok:lombok:1.18.20') + compileOnly 'org.projectlombok:lombok:1.18.22' + annotationProcessor 'org.projectlombok:lombok:1.18.22' + api ("org.seleniumhq.selenium:selenium-java") { version { strictly "${project.property('selenium.version')}" diff --git a/docs/Note-for-developers.md b/docs/Note-for-developers.md index 586df8f5e..d6182196d 100644 --- a/docs/Note-for-developers.md +++ b/docs/Note-for-developers.md @@ -12,28 +12,7 @@ This is the Gradle project. Be sure that: -- The `JAVA_HOME` environmental contains a path to JDK > 7 - -- If non built-in gradle distribution is used then its version should be > 2.1 - -## Compiler - -This project is compiled in some not common way. We use `ecj` Eclipse Java Compiler. Below is the sample how to define this compiler by IDE. -![eclipse compiler](https://cloud.githubusercontent.com/assets/4927589/14228367/6fce184e-f91b-11e5-837c-2673446d24ea.png) - -## JDK - -Please check following settings: - -![](https://cloud.githubusercontent.com/assets/4927589/18324490/7ffd3ba4-7545-11e6-9f22-eb028737283c.png) - -![](https://cloud.githubusercontent.com/assets/4927589/18324593/f5254e3a-7545-11e6-85c5-e4c491ee268d.png) - -![](https://cloud.githubusercontent.com/assets/4927589/18324648/3f4635a6-7546-11e6-966c-2949059968ac.png) - -![](https://cloud.githubusercontent.com/assets/4927589/18324760/cbca4aee-7546-11e6-8cfb-e86d8018be6a.png) - -![](https://cloud.githubusercontent.com/assets/4927589/18324835/2e3bfc04-7547-11e6-8f5e-981aea8f1771.png) +- The `JAVA_HOME` environmental contains a path to JDK 1.8+ ## Coding Standards From 65e5c09bea77f4ea34695f90b952e43d385668ac Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Wed, 27 Oct 2021 14:19:19 +0200 Subject: [PATCH 2/3] Make compiler happy --- build.gradle | 1 - .../io/appium/java_client/remote/AppiumCommandExecutor.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c755722d6..92c87a6d5 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,6 @@ plugins { id 'java-library' id 'idea' id 'maven-publish' - id 'eclipse' id 'jacoco' id 'checkstyle' id 'signing' diff --git a/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java b/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java index e1e1b766c..463e14c38 100644 --- a/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java +++ b/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java @@ -161,7 +161,7 @@ private Response createSession(Command command) throws IOException { } public void refreshAdditionalCommands() { - getAdditionalCommands().forEach(super::defineCommand); + getAdditionalCommands().forEach(this::defineCommand); } @Override From 11a3463fab50c167b8a2b4779f8b2c74bc8d9b17 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Wed, 27 Oct 2021 15:50:04 +0200 Subject: [PATCH 3/3] Restore Eclipse plugin --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 92c87a6d5..c242b1352 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ import org.apache.tools.ant.filters.* plugins { id 'java-library' id 'idea' + id 'eclipse' id 'maven-publish' id 'jacoco' id 'checkstyle'