Skip to content

Commit c8cee6e

Browse files
build: update gradle and fix jitpack build failures (#1389)
1 parent b794c52 commit c8cee6e

File tree

3 files changed

+41
-47
lines changed

3 files changed

+41
-47
lines changed

build.gradle

Lines changed: 38 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
1-
apply plugin: 'java'
2-
apply plugin: 'idea'
3-
apply plugin: 'maven-publish'
4-
apply plugin: 'eclipse'
5-
apply plugin: 'jacoco'
6-
apply plugin: 'checkstyle'
7-
apply plugin: 'signing'
8-
91
import org.apache.tools.ant.filters.*
102

3+
plugins {
4+
id 'java'
5+
id 'idea'
6+
id 'maven-publish'
7+
id 'eclipse'
8+
id 'jacoco'
9+
id 'checkstyle'
10+
id 'signing'
11+
id 'org.owasp.dependencycheck' version '5.3.2.1'
12+
id 'com.github.johnrengelman.shadow' version '5.2.0'
13+
}
14+
1115
repositories {
1216
jcenter()
1317
mavenCentral()
1418
}
1519

16-
buildscript {
17-
repositories {
18-
jcenter()
19-
mavenCentral()
20-
}
21-
dependencies {
22-
classpath 'org.owasp:dependency-check-gradle:5.3.2.1'
23-
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
24-
}
25-
}
26-
27-
apply plugin: 'org.owasp.dependencycheck'
28-
apply plugin: 'com.github.johnrengelman.shadow'
29-
3020
configurations {
3121
ecj
3222
lombok
@@ -60,33 +50,39 @@ compileJava {
6050
dependencies {
6151
compileOnly('org.projectlombok:lombok:1.18.12')
6252
annotationProcessor('org.projectlombok:lombok:1.18.12')
63-
compile ("org.seleniumhq.selenium:selenium-java:${project.property('selenium.version')}") {
64-
force = true
53+
implementation ("org.seleniumhq.selenium:selenium-java") {
54+
version {
55+
strictly "${project.property('selenium.version')}"
56+
}
6557

6658
exclude group: 'com.google.code.gson'
6759
exclude module: 'htmlunit-driver'
6860
exclude group: 'net.sourceforge.htmlunit'
6961

7062
}
71-
compile ("org.seleniumhq.selenium:selenium-support:${project.property('selenium.version')}") {
72-
force = true
63+
implementation ("org.seleniumhq.selenium:selenium-support") {
64+
version {
65+
strictly "${project.property('selenium.version')}"
66+
}
7367
}
74-
compile ("org.seleniumhq.selenium:selenium-api:${project.property('selenium.version')}") {
75-
force = true
68+
implementation ("org.seleniumhq.selenium:selenium-api") {
69+
version {
70+
strictly "${project.property('selenium.version')}"
71+
}
7672
}
77-
compile 'com.google.code.gson:gson:2.8.6'
78-
compile 'org.apache.httpcomponents:httpclient:4.5.12'
79-
compile 'cglib:cglib:3.3.0'
80-
compile 'commons-validator:commons-validator:1.7'
81-
compile 'org.apache.commons:commons-lang3:3.11'
82-
compile 'commons-io:commons-io:2.7'
83-
compile 'org.springframework:spring-context:5.2.8.RELEASE'
84-
compile 'org.aspectj:aspectjweaver:1.9.6'
85-
compile 'org.slf4j:slf4j-api:1.7.30'
86-
87-
testCompile 'junit:junit:4.13'
88-
testCompile 'org.hamcrest:hamcrest:2.2'
89-
testCompile (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '4.2.0') {
73+
implementation 'com.google.code.gson:gson:2.8.6'
74+
implementation 'org.apache.httpcomponents:httpclient:4.5.12'
75+
implementation 'cglib:cglib:3.3.0'
76+
implementation 'commons-validator:commons-validator:1.7'
77+
implementation 'org.apache.commons:commons-lang3:3.11'
78+
implementation 'commons-io:commons-io:2.7'
79+
implementation 'org.springframework:spring-context:5.2.8.RELEASE'
80+
implementation 'org.aspectj:aspectjweaver:1.9.6'
81+
implementation 'org.slf4j:slf4j-api:1.7.30'
82+
83+
testImplementation 'junit:junit:4.13'
84+
testImplementation 'org.hamcrest:hamcrest:2.2'
85+
testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '4.2.0') {
9086
exclude group: 'org.seleniumhq.selenium'
9187
}
9288
}
@@ -134,8 +130,6 @@ publishing {
134130
artifactId = 'java-client'
135131
version = '7.3.0'
136132
from components.java
137-
artifact sourcesJar
138-
artifact javadocJar
139133
pom {
140134
name = 'java-client'
141135
description = 'Java client for Appium Mobile Webdriver'
@@ -199,7 +193,7 @@ signing {
199193
}
200194

201195
wrapper {
202-
gradleVersion = '5.4'
196+
gradleVersion = '6.6.1'
203197
distributionType = Wrapper.DistributionType.ALL
204198
}
205199

src/test/java/io/appium/java_client/service/local/ServerBuilderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public void checkAbilityToStartServiceUsingCapabilities() {
161161
caps.setCapability(APP_PACKAGE, "io.appium.android.apis");
162162
caps.setCapability(APP_ACTIVITY, ".view.WebView1");
163163
caps.setCapability(APP, apiDemosApk().toAbsolutePath().toString());
164-
caps.setCapability(CHROMEDRIVER_EXECUTABLE, chromeManager.getBinaryPath());
164+
caps.setCapability(CHROMEDRIVER_EXECUTABLE, chromeManager.getDownloadedDriverPath());
165165

166166
service = new AppiumServiceBuilder().withCapabilities(caps).build();
167167
service.start();
@@ -184,7 +184,7 @@ public void checkAbilityToStartServiceUsingCapabilitiesAndFlags() {
184184
caps.setCapability("quotes", "\"'");
185185
caps.setCapability("goog:chromeOptions",
186186
ImmutableMap.of("env", ImmutableMap.of("test", "value"), "val2", 0));
187-
caps.setCapability(CHROMEDRIVER_EXECUTABLE, chromeManager.getBinaryPath());
187+
caps.setCapability(CHROMEDRIVER_EXECUTABLE, chromeManager.getDownloadedDriverPath());
188188

189189
service = new AppiumServiceBuilder()
190190
.withArgument(CALLBACK_ADDRESS, testIP)

src/test/java/io/appium/java_client/service/local/StartingAppLocallyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class StartingAppLocallyTest {
9191
WebDriverManager chromeManager = chromedriver();
9292
chromeManager.setup();
9393
serverCapabilities.setCapability(AndroidMobileCapabilityType.CHROMEDRIVER_EXECUTABLE,
94-
chromeManager.getBinaryPath());
94+
chromeManager.getDownloadedDriverPath());
9595

9696
AppiumServiceBuilder builder = new AppiumServiceBuilder()
9797
.withArgument(GeneralServerFlag.SESSION_OVERRIDE)

0 commit comments

Comments
 (0)