Skip to content

Commit

Permalink
Upgrade versions (#12)
Browse files Browse the repository at this point in the history
* Upgrade tools and frameworks
* Upgrade to java11 and gradle 5
  • Loading branch information
npalm authored Mar 10, 2019
1 parent 3dfa4cd commit db35dcd
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: java
install: true

jdk:
- oraclejdk8
- openjdk11

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
Expand Down
18 changes: 12 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
springBootVersion = '2.0.6.RELEASE'
springBootVersion = '2.1.3.RELEASE'
}
repositories {
mavenLocal()
Expand All @@ -11,6 +11,7 @@ buildscript {
}
}


apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'io.spring.dependency-management'
Expand All @@ -20,28 +21,33 @@ apply plugin: 'project-report'
apply from: "${rootDir}/gradle/dependencies.gradle"
apply from: "${rootDir}/gradle/jacoco.gradle"

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11


repositories {
mavenLocal()
jcenter()
}

dependencies {
annotationProcessor libraries.processors

compile libraries.springboot,
libraries.tools,
libraries.graphql,
libraries.database

testCompile libraries.test

testAnnotationProcessor libraries.processors
}

// Enables passing command line options to bootRun (e.g ./gradlew -Dspring.profiles.active=development bootRun)
bootRun {
systemProperties System.properties
}

task wrapper(type: Wrapper) {
gradleVersion = '4.9'
}
wrapper {
gradleVersion = '5.2.1'
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Currently required by graphql / spring combination
kotlin.version=1.3.10
18 changes: 11 additions & 7 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,28 @@ libraries.springboot = [


libraries.tools = [
'org.projectlombok:lombok:1.18.2',
'org.apache.commons:commons-lang3:3.7',
'io.reactivex.rxjava2:rxjava:2.1.5',
'org.projectlombok:lombok:1.18.6',
'org.apache.commons:commons-lang3:3.8.1',
'io.reactivex.rxjava2:rxjava:2.2.7',
'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:',
'com.google.guava:guava:26.0-jre'
'com.google.guava:guava:27.1-jre'
]


libraries.graphql = [
'com.graphql-java-kickstart:graphql-spring-boot-starter:5.0.5',
'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.0.5',
'com.graphql-java-kickstart:graphql-java-tools:5.3.4'
'com.graphql-java-kickstart:graphql-spring-boot-starter:5.7.0',
'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.7.0',
'com.graphql-java-kickstart:graphql-java-tools:5.4.1'
]

libraries.database = [
'com.h2database:h2'
]

libraries.processors = [
'org.projectlombok:lombok:1.18.6'
]

libraries.test = [
'org.mockito:mockito-core:2.21.0',
'org.springframework.boot:spring-boot-starter-test',
Expand Down
3 changes: 1 addition & 2 deletions gradle/jacoco.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: "jacoco"

jacoco {
toolVersion = findProperty("jacocoVersion") ?: "0.8.1"
toolVersion = findProperty("jacocoVersion") ?: "0.8.2"
}

jacocoTestReport {
Expand All @@ -10,4 +10,3 @@ jacocoTestReport {
html.enabled true
}
}

3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Sep 12 17:40:13 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package ofouro.code.graphql.demo.resolvers;

import lombok.Data;
import lombok.EqualsAndHashCode;
import ofouro.code.graphql.demo.model.Comment;
import org.springframework.data.domain.Page;

import java.util.List;

@Data
@EqualsAndHashCode
public class CommentPageableResponse extends PageableResponse {

private List<Comment> content;
Expand Down

0 comments on commit db35dcd

Please sign in to comment.