Skip to content

Commit

Permalink
Update Gradle version support (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
barryadk committed Aug 30, 2021
1 parent 24478fe commit 5ec88cf
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 25 deletions.
23 changes: 12 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
plugins {
id 'groovy'
id 'java-gradle-plugin'
id 'net.researchgate.release' version '2.6.0'
id 'net.researchgate.release' version '2.8.1'
// Publishing publicly
id 'com.gradle.plugin-publish' version '0.9.10'
id 'com.gradle.plugin-publish' version '0.14.0'
// Publishing to Artifactory
id 'maven-publish'
}
Expand All @@ -17,17 +17,18 @@ plugins {
// * * * * * * * * * * * *

repositories {
jcenter()
mavenLocal()
mavenCentral()
}

dependencies {
compile gradleApi()
compile group: 'com.squareup.okhttp', name: 'okhttp', version:'2.7.5'
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.7'
testCompile group: 'com.github.tomakehurst', name: 'wiremock', version:'2.14.0'
testCompile gradleTestKit()
testCompile 'junit:junit:4+'
testCompile group: 'io.swagger', name: 'swagger-parser', version:'1.0.34'
implementation gradleApi()
implementation group: 'com.squareup.okhttp', name: 'okhttp', version:'2.7.5'
implementation group: 'org.apache.commons', name: 'commons-lang3', version:'3.7'
testImplementation group: 'com.github.tomakehurst', name: 'wiremock', version:'2.14.0'
testImplementation gradleTestKit()
testImplementation 'junit:junit:4+'
testImplementation group: 'io.swagger', name: 'swagger-parser', version:'1.0.34'

}

Expand Down Expand Up @@ -74,4 +75,4 @@ pluginBundle {
id = project.pluginId
}
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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 @@
#Thu Jun 21 16:50:21 IST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
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=""
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=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/swagger/swaggerhub/tasks/DownloadTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
* Downloads API definition from SwaggerHub
*/
public class DownloadTask extends DefaultTask {
private static final Logger LOGGER = Logging.getLogger(DownloadTask.class);
private String owner;
private String api;
private String version;
private String token;
private String outputFile;
private String format = "json";
private String host = "api.swaggerhub.com";
private int port = 443;
private Integer port = 443;
private String protocol = "https";
private static Logger LOGGER = Logging.getLogger(DownloadTask.class);

@Input
public String getOwner() {
Expand Down Expand Up @@ -82,11 +82,11 @@ public void setHost(String host) {

@Input
@Optional
public int getPort() {
public Integer getPort() {
return port;
}

public void setPort(int port) {
public void setPort(Integer port) {
this.port = port;
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/swagger/swaggerhub/tasks/UploadTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
* Uploads API definition to SwaggerHub
*/
public class UploadTask extends DefaultTask {
private static final Logger LOGGER = Logging.getLogger(UploadTask.class);
private String owner;
private String api;
private String version;
private String token;
private String inputFile;
private Boolean isPrivate = false;
private String host = "api.swaggerhub.com";
private int port = 443;
private Integer port = 443;
private String protocol = "https";
private String format = "json";
private String oas = "2.0";
private static Logger LOGGER = Logging.getLogger(DownloadTask.class);

private SwaggerHubClient swaggerHubClient;

Expand Down Expand Up @@ -103,11 +103,11 @@ public void setHost(String host) {

@Input
@Optional
public int getPort() {
public Integer getPort() {
return port;
}

public void setPort(int port) {
public void setPort(Integer port) {
this.port = port;
}

Expand Down

0 comments on commit 5ec88cf

Please sign in to comment.