Skip to content

Commit 425d8dd

Browse files
committed
Update Gradle and convert everything to Kotlin
1 parent 8ec3e31 commit 425d8dd

File tree

11 files changed

+663
-663
lines changed

11 files changed

+663
-663
lines changed

build.gradle renamed to build.gradle.kts

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,37 @@
1414
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17-
apply plugin: 'groovy'
18-
apply plugin: 'maven'
19-
20-
group = 'com.github.replaymod'
21-
version = '1.0-SNAPSHOT'
17+
plugins {
18+
`kotlin-dsl`
19+
`maven-publish`
20+
groovy
21+
}
2222

23-
sourceCompatibility = '1.8'
24-
targetCompatibility = '1.8'
23+
group = "com.github.replaymod"
24+
version = "SNAPSHOT"
2525

26-
repositories {
27-
mavenCentral()
28-
maven {
29-
url 'https://jitpack.io'
26+
gradlePlugin {
27+
plugins {
28+
register("preprocess") {
29+
id = "com.replaymod.preprocess"
30+
implementationClass = "com.replaymod.gradle.preprocess.PreprocessPlugin"
31+
}
3032
}
3133
}
3234

33-
dependencies {
34-
compile gradleApi()
35-
compile localGroovy()
36-
compile 'com.github.replaymod:remap:d2c7f45'
35+
java {
36+
sourceCompatibility = JavaVersion.VERSION_1_8
37+
targetCompatibility = JavaVersion.VERSION_1_8
3738
}
3839

39-
jar {
40-
baseName 'preprocessor'
40+
repositories {
41+
mavenLocal()
42+
mavenCentral()
43+
maven(url = "https://jitpack.io")
4144
}
4245

46+
dependencies {
47+
implementation(gradleApi())
48+
compile(localGroovy())
49+
implementation("com.github.replaymod:remap:d2c7f45")
50+
}

gradle/wrapper/gradle-wrapper.jar

905 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3+
distributionSha256Sum=7bdbad1e4f54f13c8a78abc00c26d44dd8709d4aedb704d913fb1bb78ac025dc
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
35
zipStoreBase=GRADLE_USER_HOME
46
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip
6-
distributionSha256Sum=8dce35f52d4c7b4a4946df73aa2830e76ba7148850753d8b5e94c5dc325ceef8

gradlew

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,16 +44,16 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

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

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"
3551

36-
warn ( ) {
52+
warn () {
3753
echo "$*"
3854
}
3955

40-
die ( ) {
56+
die () {
4157
echo
4258
echo "$*"
4359
echo
@@ -155,7 +171,7 @@ if $cygwin ; then
155171
fi
156172

157173
# Escape application args
158-
save ( ) {
174+
save () {
159175
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160176
echo " "
161177
}

gradlew.bat

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem http://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

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

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = "preprocessor"

src/main/groovy/com/replaymod/gradle/preprocess/PreprocessPlugin.groovy

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)