Skip to content

Commit 3459ac9

Browse files
committed
Move to CadixDev namespace, and to Gradle 6.4 wrapper
1 parent f05f212 commit 3459ac9

16 files changed

+100
-87
lines changed

build.gradle

Lines changed: 21 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,56 @@ plugins {
22
id 'java-gradle-plugin'
33
id 'groovy'
44

5-
id 'eclipse'
6-
id 'idea'
5+
id 'com.gradle.plugin-publish' version '0.9.10'
76

8-
id 'maven-publish'
9-
id 'com.gradle.plugin-publish' version '0.9.5'
10-
11-
id 'net.minecrell.licenser' version '0.3'
7+
id 'net.minecrell.licenser' version '0.4.1'
128
}
139

14-
group = 'net.minecrell'
15-
version = '0.9.1-SNAPSHOT'
16-
description = 'A Gradle plugin to manage patches for Git repositories'
17-
18-
sourceCompatibility = '1.7'
19-
targetCompatibility = '1.7'
10+
sourceCompatibility = '1.8'
11+
targetCompatibility = '1.8'
2012

21-
repositories {
22-
jcenter()
23-
}
13+
group = 'org.cadixdev.gradle'
14+
version = '0.10.0-SNAPSHOT'
15+
description = 'A Gradle plugin to manage patches for Git repositories'
2416

2517
dependencies {
26-
compileOnly'org.codehaus.groovy:groovy-all:2.4.7:indy'
27-
}
28-
29-
tasks.withType(GroovyCompile) {
30-
groovyOptions.optimizationOptions.indy = true
18+
implementation gradleApi()
3119
}
3220

3321
license {
34-
header = file('LICENSE')
3522
include '**/*.java'
3623
include '**/*.groovy'
3724
}
3825

3926
task sourceJar(type: Jar) {
40-
classifier = 'sources'
27+
archiveClassifier = 'sources'
4128
from sourceSets.main.allSource
4229
}
4330

44-
publishing {
45-
publications {
46-
mavenJava(MavenPublication) {
47-
from components.java
48-
49-
artifact sourceJar
31+
task groovydocJar(type: Jar, dependsOn: groovydoc) {
32+
archiveClassifier = 'groovydoc'
33+
from groovydoc.destinationDir
34+
}
5035

51-
repositories {
52-
maven {
53-
url = System.getenv('REPO_' + (version.endsWith('-SNAPSHOT') ? 'SNAPSHOTS' : 'RELEASES')) ?: "$buildDir/repo"
54-
}
55-
}
36+
gradlePlugin {
37+
plugins {
38+
licenser {
39+
id = 'org.cadixdev.gitpatcher'
40+
implementationClass = 'org.cadixdev.gradle.gitpatcher.GitPatcher'
5641
}
5742
}
5843
}
5944

6045
pluginBundle {
61-
website = 'https://github.com/Minecrell/gitpatcher'
46+
website = 'https://github.com/CadixDev/gitpatcher'
6247
vcsUrl = website
6348
description = project.description
6449
tags = ['git']
6550

6651
plugins {
67-
gitpatcherPlugin {
68-
id = 'net.minecrell.gitpatcher'
52+
licenserPlugin {
53+
id = 'org.cadixdev.gitpatcher'
6954
displayName = 'gitpatcher'
7055
}
7156
}
7257
}
73-
74-
task wrapper(type: Wrapper) {
75-
gradleVersion = '3.3'
76-
}

gradle/wrapper/gradle-wrapper.jar

4.59 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Thu Mar 02 17:40:42 CET 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip

gradlew

Lines changed: 36 additions & 23 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+
# https://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
@@ -66,6 +82,7 @@ esac
6682

6783
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6884

85+
6986
# Determine the Java command to use to start the JVM.
7087
if [ -n "$JAVA_HOME" ] ; then
7188
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -109,10 +126,11 @@ if $darwin; then
109126
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110127
fi
111128

112-
# For Cygwin, switch paths to Windows format before running java
113-
if $cygwin ; then
129+
# For Cygwin or MSYS, switch paths to Windows format before running java
130+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
114131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
116134
JAVACMD=`cygpath --unix "$JAVACMD"`
117135

118136
# We build the pattern for arguments to be converted via cygpath
@@ -138,35 +156,30 @@ if $cygwin ; then
138156
else
139157
eval `echo args$i`="\"$arg\""
140158
fi
141-
i=$((i+1))
159+
i=`expr $i + 1`
142160
done
143161
case $i in
144-
(0) set -- ;;
145-
(1) set -- "$args0" ;;
146-
(2) set -- "$args0" "$args1" ;;
147-
(3) set -- "$args0" "$args1" "$args2" ;;
148-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
162+
0) set -- ;;
163+
1) set -- "$args0" ;;
164+
2) set -- "$args0" "$args1" ;;
165+
3) set -- "$args0" "$args1" "$args2" ;;
166+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154172
esac
155173
fi
156174

157175
# Escape application args
158-
save ( ) {
176+
save () {
159177
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160178
echo " "
161179
}
162-
APP_ARGS=$(save "$@")
180+
APP_ARGS=`save "$@"`
163181

164182
# Collect all arguments for the java command, following the shell quoting and substitution rules
165183
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166184

167-
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168-
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169-
cd "$(dirname "$0")"
170-
fi
171-
172185
exec "$JAVACMD" "$@"

gradlew.bat

Lines changed: 21 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 https://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
@@ -13,8 +29,11 @@ if "%DIRNAME%" == "" set DIRNAME=.
1329
set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
1635
@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=
36+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1837

1938
@rem Find java.exe
2039
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -65,6 +84,7 @@ set CMD_LINE_ARGS=%*
6584

6685
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
6786

87+
6888
@rem Execute Gradle
6989
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
7090

src/main/groovy/net/minecrell/gitpatcher/Git.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/Git.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher
23+
package org.cadixdev.gradle.gitpatcher
2424

2525
class Git {
2626

src/main/groovy/net/minecrell/gitpatcher/GitPatcher.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/GitPatcher.groovy

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher
23+
package org.cadixdev.gradle.gitpatcher
2424

25-
import net.minecrell.gitpatcher.task.FindGitTask
26-
import net.minecrell.gitpatcher.task.UpdateSubmodulesTask
27-
import net.minecrell.gitpatcher.task.patch.ApplyPatchesTask
28-
import net.minecrell.gitpatcher.task.patch.MakePatchesTask
25+
26+
import org.cadixdev.gradle.gitpatcher.task.FindGitTask
27+
import org.cadixdev.gradle.gitpatcher.task.UpdateSubmodulesTask
28+
import org.cadixdev.gradle.gitpatcher.task.patch.ApplyPatchesTask
29+
import org.cadixdev.gradle.gitpatcher.task.patch.MakePatchesTask
2930
import org.gradle.api.Plugin
3031
import org.gradle.api.Project
3132

src/main/groovy/net/minecrell/gitpatcher/PatchExtension.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/PatchExtension.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher
23+
package org.cadixdev.gradle.gitpatcher
2424

2525
class PatchExtension {
2626

src/main/groovy/net/minecrell/gitpatcher/task/FindGitTask.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/task/FindGitTask.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher.task
23+
package org.cadixdev.gradle.gitpatcher.task
2424

25-
import net.minecrell.gitpatcher.Git
25+
import org.cadixdev.gradle.gitpatcher.Git
2626
import org.gradle.api.DefaultTask
2727
import org.gradle.api.tasks.TaskAction
2828

src/main/groovy/net/minecrell/gitpatcher/task/GitTask.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/task/GitTask.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher.task
23+
package org.cadixdev.gradle.gitpatcher.task
2424

2525
import org.gradle.api.DefaultTask
2626

src/main/groovy/net/minecrell/gitpatcher/task/SubmoduleTask.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/task/SubmoduleTask.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher.task
23+
package org.cadixdev.gradle.gitpatcher.task
2424

2525
abstract class SubmoduleTask extends GitTask {
2626

src/main/groovy/net/minecrell/gitpatcher/task/UpdateSubmodulesTask.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/task/UpdateSubmodulesTask.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher.task
23+
package org.cadixdev.gradle.gitpatcher.task
2424

2525
import static java.lang.System.out
2626

27-
import net.minecrell.gitpatcher.Git
27+
import org.cadixdev.gradle.gitpatcher.Git
2828
import org.gradle.api.tasks.TaskAction
2929

3030
class UpdateSubmodulesTask extends SubmoduleTask {

src/main/groovy/net/minecrell/gitpatcher/task/patch/ApplyPatchesTask.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/task/patch/ApplyPatchesTask.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher.task.patch
23+
package org.cadixdev.gradle.gitpatcher.task.patch
2424

2525
import static java.lang.System.out
2626

27-
import net.minecrell.gitpatcher.Git
28-
import net.minecrell.gitpatcher.task.UpdateSubmodulesTask
27+
import org.cadixdev.gradle.gitpatcher.Git
28+
import org.cadixdev.gradle.gitpatcher.task.UpdateSubmodulesTask
2929
import org.gradle.api.tasks.InputFiles
3030
import org.gradle.api.tasks.OutputDirectory
3131
import org.gradle.api.tasks.OutputFile

src/main/groovy/net/minecrell/gitpatcher/task/patch/MakePatchesTask.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/task/patch/MakePatchesTask.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher.task.patch
23+
package org.cadixdev.gradle.gitpatcher.task.patch
2424

2525
import static java.lang.System.out
2626

27-
import net.minecrell.gitpatcher.Git
27+
import org.cadixdev.gradle.gitpatcher.Git
2828
import org.gradle.api.tasks.InputDirectory
2929
import org.gradle.api.tasks.InputFile
3030
import org.gradle.api.tasks.OutputDirectory

src/main/groovy/net/minecrell/gitpatcher/task/patch/PatchTask.groovy renamed to src/main/groovy/org/cadixdev/gradle/gitpatcher/task/patch/PatchTask.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
* THE SOFTWARE.
2121
*/
2222

23-
package net.minecrell.gitpatcher.task.patch
23+
package org.cadixdev.gradle.gitpatcher.task.patch
2424

25-
import net.minecrell.gitpatcher.task.SubmoduleTask
25+
import org.cadixdev.gradle.gitpatcher.task.SubmoduleTask
2626

2727
abstract class PatchTask extends SubmoduleTask {
2828

src/main/resources/META-INF/gradle-plugins/net.minecrell.gitpatcher.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)