Skip to content

Commit 815ecb9

Browse files
authored
Merge pull request #27 from EndlessCodeGroup/develop
v0.8.2
2 parents 7d928df + 2a7aee5 commit 815ecb9

File tree

10 files changed

+55
-15
lines changed

10 files changed

+55
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
## File-based project format:
77
*.iws
8+
*.iml
89

910
## Gradle
1011
.gradle/

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ Gradle utilities for easier writing Bukkit plugins.
2929

3030
## Apply plugin
3131
[BukkitGradle on plugins.gradle.org](https://plugins.gradle.org/plugin/ru.endlesscode.bukkitgradle)
32+
> **NOTE:** Gradle 5.0+ required
33+
3234
#### With new plugins mechanism
3335
```groovy
3436
plugins {
35-
id "ru.endlesscode.bukkitgradle" version "0.8.1"
37+
id "ru.endlesscode.bukkitgradle" version "0.8.2"
3638
}
3739
```
3840

@@ -43,7 +45,7 @@ buildscript {
4345
jcenter()
4446
}
4547
dependencies {
46-
classpath "gradle.plugin.ru.endlesscode:bukkit-gradle:0.8.1"
48+
classpath "gradle.plugin.ru.endlesscode:bukkit-gradle:0.8.2"
4749
}
4850
}
4951
@@ -57,7 +59,7 @@ You can clone [this example project](https://github.com/EndlessCodeGroup/BukkitG
5759
Simple `build.gradle` file that use BukkitGradle:
5860
```groovy
5961
plugins {
60-
id "ru.endlesscode.bukkitgradle" version "0.8.1"
62+
id "ru.endlesscode.bukkitgradle" version "0.8.2"
6163
}
6264
6365
// Project information

build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
plugins {
22
id "groovy"
3-
id "idea"
4-
53
id "java-gradle-plugin"
64
id "com.gradle.plugin-publish" version "0.9.10"
5+
id "com.github.ben-manes.versions" version "0.21.0"
76
}
87

98
apply from: "jacoco.gradle"
@@ -14,8 +13,6 @@ repositories {
1413
mavenCentral()
1514
}
1615

17-
jar.archivePath
18-
1916
dependencies {
2017
implementation gradleApi()
2118
implementation localGroovy()

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
group=ru.endlesscode
22
description=Bukkit Gradle integration plugins
3-
version=0.8.1
3+
version=0.8.2
44
org.gradle.jvmargs=-Xmx3G
55
org.gradle.parallel=true
66
org.gradle.daemon=true

gradle/wrapper/gradle-wrapper.jar

1.26 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Fri Apr 12 00:37:38 MSK 2019
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip

gradlew

100644100755
Lines changed: 17 additions & 1 deletion
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,7 +44,7 @@ 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"

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

src/main/groovy/ru/endlesscode/bukkitgradle/task/GenerateMeta.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package ru.endlesscode.bukkitgradle.task
22

33
import org.gradle.api.DefaultTask
44
import org.gradle.api.tasks.Input
5+
import org.gradle.api.tasks.OutputFile
56
import org.gradle.api.tasks.TaskAction
67
import ru.endlesscode.bukkitgradle.meta.MetaFile
78

@@ -10,6 +11,8 @@ import java.nio.file.Path
1011
class GenerateMeta extends DefaultTask {
1112
@Input
1213
MetaFile metaFile
14+
15+
@OutputFile
1316
Path target
1417

1518
Path getTarget() {

src/main/groovy/ru/endlesscode/bukkitgradle/task/PrepareServer.groovy

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package ru.endlesscode.bukkitgradle.task
22

33
import org.gradle.api.DefaultTask
44
import org.gradle.api.tasks.Input
5+
import org.gradle.api.tasks.OutputDirectory
56
import org.gradle.api.tasks.TaskAction
67
import org.gradle.jvm.tasks.Jar
78
import ru.endlesscode.bukkitgradle.extension.RunConfiguration
@@ -15,13 +16,16 @@ class PrepareServer extends DefaultTask {
1516
@Input
1617
ServerCore core
1718

18-
Closure<Path> serverDir
19+
@Input
1920
RunConfiguration run
2021

22+
@OutputDirectory
23+
Closure<Path> serverDir
24+
2125
void setCore(ServerCore core) {
2226
this.core = core
23-
this.serverDir = { core.serverDir }
2427
this.run = project.bukkit.run
28+
this.serverDir = { Files.createDirectories(core.serverDir) }
2529
}
2630

2731
@TaskAction
@@ -58,8 +62,8 @@ class PrepareServer extends DefaultTask {
5862
void copyPluginsToServerDir() {
5963
String pluginName = "${project.bukkit.meta.name}.jar"
6064
List<Path> paths = project.tasks.withType(Jar).collect { jar ->
61-
if (jar.classifier in ["src", "source", "sources", "javadoc"]) return
62-
jar.archivePath.toPath()
65+
if (jar.archiveClassifier.get() in ["src", "source", "sources", "javadoc"]) return
66+
jar.archiveFile.get().asFile.toPath()
6367
}
6468

6569
Path pluginsDir = getServerDir().resolve("plugins")

0 commit comments

Comments
 (0)