Skip to content

Commit a6827cf

Browse files
authored
Merge pull request #43 from haroldadmin/features/maven-publish-plugin
Update to Gradle v7 and maven-publish plugin
2 parents e968685 + f4c6841 commit a6827cf

File tree

5 files changed

+34
-17
lines changed

5 files changed

+34
-17
lines changed

build.gradle.kts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
plugins {
2-
kotlin("jvm") version "1.4.31"
2+
kotlin("jvm") version "1.5.20"
33
id("org.jetbrains.dokka") version "1.4.32"
4-
maven
4+
`maven-publish`
55
}
66

7-
group = "com.github.haroldadmin"
8-
97
repositories {
10-
jcenter()
8+
mavenCentral()
119
}
1210

1311
val test by tasks.getting(Test::class) {
1412
useJUnitPlatform()
1513
}
1614

17-
tasks.wrapper {
18-
gradleVersion = "6.2"
15+
publishing {
16+
publications {
17+
create<MavenPublication>("NetworkResponseAdapter") {
18+
groupId = "com.github.haroldadmin"
19+
artifactId = "NetworkResponseAdapter"
20+
version = "4.2.1"
21+
22+
from(components["java"])
23+
}
24+
}
1925
}
2026

2127
dependencies {
22-
23-
val coroutinesVersion = "1.4.2"
28+
val coroutinesVersion = "1.5.0"
2429
val retrofitVersion = "2.9.0"
25-
val okHttpVersion = "4.9.0"
30+
val okHttpVersion = "4.9.1"
2631

2732
api("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
2833
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")

gradle/wrapper/gradle-wrapper.jar

-508 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ esac
8282

8383
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
8484

85-
8685
# Determine the Java command to use to start the JVM.
8786
if [ -n "$JAVA_HOME" ] ; then
8887
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -130,7 +129,6 @@ fi
130129
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131130
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132131
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133-
134132
JAVACMD=`cygpath --unix "$JAVACMD"`
135133

136134
# We build the pattern for arguments to be converted via cygpath

gradlew.bat

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4040

4141
set JAVA_EXE=java.exe
4242
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
43+
if "%ERRORLEVEL%" == "0" goto init
4444

4545
echo.
4646
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +54,7 @@ goto fail
5454
set JAVA_HOME=%JAVA_HOME:"=%
5555
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5656

57-
if exist "%JAVA_EXE%" goto execute
57+
if exist "%JAVA_EXE%" goto init
5858

5959
echo.
6060
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,14 +64,28 @@ echo location of your Java installation.
6464

6565
goto fail
6666

67+
:init
68+
@rem Get command-line arguments, handling Windows variants
69+
70+
if not "%OS%" == "Windows_NT" goto win9xME_args
71+
72+
:win9xME_args
73+
@rem Slurp the command line arguments.
74+
set CMD_LINE_ARGS=
75+
set _SKIP=2
76+
77+
:win9xME_args_slurp
78+
if "x%~1" == "x" goto execute
79+
80+
set CMD_LINE_ARGS=%*
81+
6782
:execute
6883
@rem Setup the command line
6984

7085
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7186

72-
7387
@rem Execute Gradle
74-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
88+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
7589

7690
:end
7791
@rem End local scope for the variables with windows NT shell

0 commit comments

Comments
 (0)