Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Commit

Permalink
Update gradle wrapper and fix gradle deprecation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshilliard authored and johndevs committed Oct 9, 2019
1 parent 4376ea8 commit fe3e9d7
Show file tree
Hide file tree
Showing 19 changed files with 101 additions and 65 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
dist: xenial
language: groovy
jdk:
- oraclejdk8
- openjdk8
env:
- TEST_CATEGORY=uncategorizedTests
- TEST_CATEGORY=widgetsetCompileTests
Expand Down
48 changes: 22 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java-gradle-plugin'
id 'groovy'
id 'maven'
id 'maven-publish'
id 'idea'
id 'codenarc'
id 'com.gradle.plugin-publish' version '0.10.0'
Expand Down Expand Up @@ -74,10 +74,6 @@ sourceSets {
**********************************************************************************************************************/
repositories{
mavenCentral()
maven { // FIXME For Junit 4.13-SNAPSHOT, remove when released
name 'JBoss'
url 'https://repository.jboss.org/'
}
}

configurations {
Expand All @@ -86,28 +82,28 @@ configurations {
}

dependencies {
compile gradleApi()
compile localGroovy()
implementation gradleApi()
implementation localGroovy()

// Jetty application server
compile "org.eclipse.jetty.aggregate:jetty-all:${project.property('jetty.version')}"
compile "org.eclipse.jetty:jetty-annotations:${project.property('jetty.version')}"
compile "org.eclipse.jetty:jetty-plus:${project.property('jetty.version')}"
compile "org.eclipse.jetty:jetty-deploy:${project.property('jetty.version')}"
implementation "org.eclipse.jetty.aggregate:jetty-all:${project.property('jetty.version')}"
implementation "org.eclipse.jetty:jetty-annotations:${project.property('jetty.version')}"
implementation "org.eclipse.jetty:jetty-plus:${project.property('jetty.version')}"
implementation "org.eclipse.jetty:jetty-deploy:${project.property('jetty.version')}"

//Payara application server
compile "fish.payara.extras:payara-embedded-web:${project.property('payara.version')}"
implementation "fish.payara.extras:payara-embedded-web:${project.property('payara.version')}"

// For GET requests
compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
implementation 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'

// Sass compilation with libSass
compile "io.bit3:jsass:${project.property('jsass.version')}"
implementation "io.bit3:jsass:${project.property('jsass.version')}"

deploy 'org.apache.maven.wagon:wagon-ssh:2.2'

testCompile gradleTestKit()
testCompile 'junit:junit:4.13-SNAPSHOT'
testImplementation gradleTestKit()
testImplementation 'junit:junit:4.13-beta-3'

// ProxyTest needs its own special configuration to avoid conflicts
proxyTest ('org.mock-server:mockserver-netty:3.10.4') {
Expand Down Expand Up @@ -176,7 +172,7 @@ jar {
'Vaadin-Package-Version': 1,
'Vaadin-License-Title': 'Apache 2.0',
'Implementation-Title': 'Vaadin Plugin for Gradle',
'Implementation-Version': version,
'Implementation-Version': archiveVersion,
'Implementation-Vendor': 'John Ahlroos',
)
}
Expand All @@ -188,7 +184,7 @@ jar {
*/
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
archiveClassifier.set('sources')
include 'com/**/*.groovy'
include 'com/**/*.java'
}
Expand Down Expand Up @@ -235,7 +231,7 @@ task uncategorizedTests(type:Test, dependsOn:['test','jar']) {
systemProperty 'integrationTestProjectVersion', version
maxParallelForks = Runtime.runtime.availableProcessors() > 1 ? Runtime.runtime.availableProcessors() - 1 : 1
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
classpath += sourceSets.functionalTest.runtimeClasspath
}

task widgetsetCompileTests(type:Test, dependsOn:['test','jar']) {
Expand All @@ -250,7 +246,7 @@ task widgetsetCompileTests(type:Test, dependsOn:['test','jar']) {
systemProperty 'integrationTestProjectVersion', version
maxParallelForks = Runtime.runtime.availableProcessors() > 1 ? Runtime.runtime.availableProcessors() - 1 : 1
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
classpath += sourceSets.functionalTest.runtimeClasspath
}

task themeCompileTests(type:Test, dependsOn:['test','jar']) {
Expand All @@ -265,7 +261,7 @@ task themeCompileTests(type:Test, dependsOn:['test','jar']) {
systemProperty 'integrationTestProjectVersion', version
maxParallelForks = Runtime.runtime.availableProcessors() > 1 ? Runtime.runtime.availableProcessors() - 1 : 1
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
classpath += sourceSets.functionalTest.runtimeClasspath
}

task fullCompileTests(type:Test, dependsOn:['test','jar']) {
Expand All @@ -279,7 +275,7 @@ task fullCompileTests(type:Test, dependsOn:['test','jar']) {
systemProperty 'integrationTestProjectVersion', version
maxParallelForks = Runtime.runtime.availableProcessors() > 1 ? Runtime.runtime.availableProcessors() - 1 : 1
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
classpath += sourceSets.functionalTest.runtimeClasspath
}

task runProjectTests(type:Test, dependsOn:['test','jar']) {
Expand All @@ -293,7 +289,7 @@ task runProjectTests(type:Test, dependsOn:['test','jar']) {
systemProperty 'integrationTestProjectVersion', version
maxParallelForks = Runtime.runtime.availableProcessors() > 1 ? Runtime.runtime.availableProcessors() - 1 : 1
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
classpath += sourceSets.functionalTest.runtimeClasspath
}

/**
Expand All @@ -307,7 +303,7 @@ task proxyTest(type:Test, dependsOn: ['test','jar']) {
include '**/tests/*ProxyTest*'
systemProperty 'integrationTestProjectVersion', version
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = configurations.proxyTest + sourceSets.functionalTest.runtimeClasspath
classpath += configurations.proxyTest + sourceSets.functionalTest.runtimeClasspath
}

/**
Expand All @@ -320,7 +316,7 @@ task allTests(type:Test, dependsOn:['test','jar']) {
}
systemProperty 'integrationTestProjectVersion', version
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
classpath += sourceSets.functionalTest.runtimeClasspath
}

if(!ext.testCategory) {
Expand Down Expand Up @@ -353,7 +349,7 @@ codenarc{
}

checkstyle {
configDir = rootProject.file('config/checkstyle')
configFile rootProject.file('config/checkstyle/checkstyle.xml')
}

plugins.withType(GroovyBasePlugin) {
Expand Down
2 changes: 1 addition & 1 deletion config/codenarc/ruleset.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ ruleset {
DuplicateListLiteral
DuplicateMapLiteral
DuplicateNumberLiteral
DuplicateStringLiteral
//DuplicateStringLiteral

// rulesets/enhanced.xml
//CloneWithoutCloneable
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jetty.version=9.4.5.v20170502
payara.version=4.1.153
jruby.version=9.1.10.0
jsass.version=5.5.1
jetty.version=9.4.21.v20190926
payara.version=5.193
jruby.version=9.2.8.0
jsass.version=5.10.0
servlet.version=3.1.0
validation.api.version=1.0.0.GA
portlet.version=2.0
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 19 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m"'
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down Expand Up @@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down
18 changes: 17 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m"
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class GradleVersionTest extends IntegrationTest {

@Parameterized.Parameters(name = "Gradle {0}")
static Collection<String> getGradleVersions() {
[ '5.0']
[ '5.6.2']
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.devsoap.plugin.tests

import com.devsoap.plugin.categories.WidgetsetCompile
import com.devsoap.plugin.categories.WidgetsetAndThemeCompile
import com.devsoap.plugin.tasks.BuildClassPathJar
import com.devsoap.plugin.tasks.CreateComponentTask
import com.devsoap.plugin.tasks.CreateProjectTask
Expand All @@ -17,9 +17,9 @@ import static org.junit.Assert.assertTrue
/**
* Created by john on 1/11/17.
*/
@Category(WidgetsetAndThemeCompile)
class MultimoduleWidgetsetThemeTest extends MultiProjectIntegrationTest {

@Category(WidgetsetCompile)
@Test void 'Multimodule project with shared widgetset and theme'() {
File widgetsetModule = makeProject('widgetset-module')
File widgetsetBuildFile = makeBuildFile(widgetsetModule)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class GradleVaadinPlugin implements Plugin<Project> {

Gradle gradle = project.gradle
VersionNumber version = VersionNumber.parse(gradle.gradleVersion)
VersionNumber requiredVersion = new VersionNumber(5, 0, 0, null)
VersionNumber requiredVersion = new VersionNumber(5, 6, 2, null)
if ( version.baseVersion < requiredVersion ) {
throw new UnsupportedVersionException("Your gradle version ($version) is too old. " +
"Plugin requires Gradle $requiredVersion+")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.devsoap.plugin.extensions

import org.gradle.api.Project
import org.gradle.api.provider.MapProperty
import org.gradle.api.provider.Property
import org.gradle.api.provider.Provider

Expand All @@ -33,21 +34,21 @@ class TestBenchNodeExtension {
private final Property<String> host
private final Property<Integer> port
private final Property<String> hub
private final Property<List<Map>> browsers
private final MapProperty<String, String> browsers

TestBenchNodeExtension(Project project) {

enabled = project.objects.property(Boolean)
host = project.objects.property(String)
port = project.objects.property(Integer)
hub = project.objects.property(String)
browsers = project.objects.property(List)
browsers = project.objects.mapProperty(String, String)

enabled.set(false)
host.set('localhost')
port.set(4445)
hub.set('http://localhost:4444/grid/register')
browsers.set([])
browsers.empty()
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.Dependency
import org.gradle.api.artifacts.ProjectDependency
import org.gradle.api.file.FileTree
import org.gradle.api.provider.ListProperty
import org.gradle.api.provider.Property
import org.gradle.api.provider.Provider
import org.gradle.api.tasks.CacheableTask
Expand Down Expand Up @@ -68,7 +69,7 @@ class CompileThemeTask extends DefaultTask {
private final Property<String> compiler = project.objects.property(String)
private final Property<Boolean> compress = project.objects.property(Boolean)
private final Property<Boolean> useClasspathJar = project.objects.property(Boolean)
private final Property<List<String>> jvmArgs = project.objects.property(List)
private final ListProperty<String> jvmArgs = project.objects.listProperty(String)

/**
* Creates a new theme compilation task
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.apache.commons.codec.digest.DigestUtils
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.file.FileCollection
import org.gradle.api.provider.ListProperty
import org.gradle.api.provider.Property
import org.gradle.api.provider.Provider
import org.gradle.api.tasks.CacheableTask
Expand Down Expand Up @@ -58,11 +59,11 @@ class CompileWidgetsetTask extends DefaultTask {
private final Property<Boolean> draftCompile = project.objects.property(Boolean)
private final Property<Boolean> strict = project.objects.property(Boolean)
private final Property<String> userAgent = project.objects.property(String)
private final Property<List<String>> jvmArgs = project.objects.property(List)
private final Property<List<String>> extraArgs = project.objects.property(List)
private final Property<List<String>> sourcePaths = project.objects.property(List)
private final ListProperty<String> jvmArgs = project.objects.listProperty(String)
private final ListProperty<String> extraArgs = project.objects.listProperty(String)
private final ListProperty<String> sourcePaths = project.objects.listProperty(String)
private final Property<Boolean> collapsePermutations = project.objects.property(Boolean)
private final Property<List<String>> extraInherits = project.objects.property(List)
private final ListProperty<String> extraInherits = project.objects.listProperty(String)
private final Property<Boolean> gwtSdkFirstInClasspath = project.objects.property(Boolean)
private final Property<String> outputDirectory = project.objects.property(String)
private final Property<Boolean> widgetsetCDN = project.objects.property(Boolean)
Expand Down Expand Up @@ -198,11 +199,11 @@ class CompileWidgetsetTask extends DefaultTask {
draftCompile.set(true)
strict.set(true)
userAgent.set(null)
jvmArgs.set(null)
extraArgs.set(null)
jvmArgs.empty()
extraArgs.empty()
sourcePaths.set(['client', 'shared'])
collapsePermutations.set(true)
extraInherits.set(null)
extraInherits.empty()
gwtSdkFirstInClasspath.set(true)
outputDirectory.set(null)
widgetsetCDN.set(false)
Expand Down
Loading

0 comments on commit fe3e9d7

Please sign in to comment.