Skip to content

Commit a81fce6

Browse files
Updated gradle version to gradle 6 (#379)
* updated gradle version to gradle 6 * updated header Co-authored-by: Ali Abbas Rizvi <aliabbasrizvi@users.noreply.github.com>
1 parent 24205e9 commit a81fce6

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

build.gradle

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ plugins {
1717
id 'me.champeau.gradle.jmh' version '0.4.5'
1818
id 'nebula.optional-base' version '3.2.0'
1919
id 'com.github.hierynomus.license' version '0.15.0'
20+
id 'com.github.spotbugs' version "4.3.0"
2021
}
2122

2223
allprojects {
@@ -44,19 +45,23 @@ allprojects {
4445

4546
subprojects {
4647
apply plugin: 'com.jfrog.bintray'
47-
apply plugin: 'findbugs'
48+
apply plugin: 'com.github.spotbugs'
4849
apply plugin: 'jacoco'
4950
apply plugin: 'java'
5051
apply plugin: 'maven-publish'
5152
apply plugin: 'me.champeau.gradle.jmh'
5253
apply plugin: 'nebula.optional-base'
5354
apply plugin: 'com.github.hierynomus.license'
5455

56+
5557
sourceCompatibility = 1.8
5658
targetCompatibility = 1.8
5759

5860
repositories {
5961
jcenter()
62+
maven {
63+
url 'https://plugins.gradle.org/m2/'
64+
}
6065
}
6166

6267
task sourcesJar(type: Jar, dependsOn: classes) {
@@ -74,15 +79,15 @@ subprojects {
7479
archives javadocJar
7580
}
7681

77-
tasks.withType(FindBugs) {
82+
spotbugsMain {
7883
reports {
7984
xml.enabled = false
8085
html.enabled = true
8186
}
8287
}
8388

84-
findbugs {
85-
findbugsJmh.enabled = false
89+
spotbugs {
90+
spotbugsJmh.enabled = false
8691
}
8792

8893
test {
@@ -207,9 +212,9 @@ task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
207212
description = 'Generates an aggregate report from all subprojects'
208213
dependsOn publishedProjects.test, jacocoMerge
209214

210-
additionalSourceDirs = files(publishedProjects.sourceSets.main.allSource.srcDirs)
211-
sourceDirectories = files(publishedProjects.sourceSets.main.allSource.srcDirs)
212-
classDirectories = files(publishedProjects.sourceSets.main.output)
215+
getAdditionalSourceDirs().setFrom(files(publishedProjects.sourceSets.main.allSource.srcDirs))
216+
getSourceDirectories().setFrom(files(publishedProjects.sourceSets.main.allSource.srcDirs))
217+
getAdditionalClassDirs().setFrom(files(publishedProjects.sourceSets.main.output))
213218
executionData jacocoMerge.destinationFile
214219

215220
reports {

core-httpclient-impl/src/test/java/com/optimizely/ab/OptimizelyHttpClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
*
3-
* Copyright 2019, Optimizely
3+
* Copyright 2019-2020, Optimizely
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -73,7 +73,7 @@ public void testProxySettings() throws IOException {
7373
@Test
7474
public void testExecute() throws IOException {
7575
HttpUriRequest httpUriRequest = RequestBuilder.get().build();
76-
ResponseHandler<Boolean> responseHandler = response -> null;
76+
ResponseHandler<Boolean> responseHandler = response -> false;
7777

7878
CloseableHttpClient mockHttpClient = mock(CloseableHttpClient.class);
7979
when(mockHttpClient.execute(httpUriRequest, responseHandler)).thenReturn(true);

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

0 commit comments

Comments
 (0)