Skip to content

Commit fe3d78c

Browse files
committed
Switch from gradle to maven attempt 2
1 parent 8f31aca commit fe3d78c

File tree

31 files changed

+786
-7
lines changed

31 files changed

+786
-7
lines changed

.github/maven/api/pom.xml renamed to .github/building/api/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>minigamesbox</artifactId>
2525
<groupId>plugily.projects</groupId>
26-
<version>1.3.3.1-java8</version>
26+
<version>1.3.17-SNAPSHOT4</version>
2727
</parent>
2828
<modelVersion>4.0.0</modelVersion>
2929

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//CHECKSTYLE:OFF
2+
import org.gradle.util.GradleVersion;
3+
import org.gradle.groovy.scripts.BasicScript;
4+
import org.gradle.groovy.scripts.ScriptSource;
5+
import org.gradle.groovy.scripts.TextResourceScriptSource;
6+
import org.gradle.internal.resource.StringTextResource;
7+
/**
8+
* Precompiled plugily.projects.java-conventions script plugin.
9+
**/
10+
@SuppressWarnings("DefaultPackage")
11+
public class PlugilyProjectsJavaConventionsPlugin implements org.gradle.api.Plugin<org.gradle.api.internal.project.ProjectInternal> {
12+
private static final String MIN_SUPPORTED_GRADLE_VERSION = "5.0";
13+
@Override
14+
public void apply(org.gradle.api.internal.project.ProjectInternal target) {
15+
assertSupportedByCurrentGradleVersion();
16+
try {
17+
Class<? extends BasicScript> pluginsBlockClass = Class.forName("cp_precompiled_PlugilyProjectsJavaConventions").asSubclass(BasicScript.class);
18+
BasicScript pluginsBlockScript = pluginsBlockClass.getDeclaredConstructor().newInstance();
19+
pluginsBlockScript.setScriptSource(scriptSource(pluginsBlockClass));
20+
pluginsBlockScript.init(target, target.getServices());
21+
pluginsBlockScript.run();
22+
target.getPluginManager().apply("java-library");
23+
target.getPluginManager().apply("signing");
24+
target.getPluginManager().apply("maven-publish");
25+
26+
27+
Class<? extends BasicScript> precompiledScriptClass = Class.forName("precompiled_PlugilyProjectsJavaConventions").asSubclass(BasicScript.class);
28+
BasicScript script = precompiledScriptClass.getDeclaredConstructor().newInstance();
29+
script.setScriptSource(scriptSource(precompiledScriptClass));
30+
script.init(target, target.getServices());
31+
script.run();
32+
} catch (Exception e) {
33+
throw new RuntimeException(e);
34+
}
35+
}
36+
private static ScriptSource scriptSource(Class<?> scriptClass) {
37+
return new TextResourceScriptSource(new StringTextResource(scriptClass.getSimpleName(), ""));
38+
}
39+
private static void assertSupportedByCurrentGradleVersion() {
40+
if (GradleVersion.current().getBaseVersion().compareTo(GradleVersion.version(MIN_SUPPORTED_GRADLE_VERSION)) < 0) {
41+
throw new RuntimeException("Precompiled Groovy script plugins require Gradle "+MIN_SUPPORTED_GRADLE_VERSION+" or higher");
42+
}
43+
}
44+
}
45+
//CHECKSTYLE:ON
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
implementation-class=PlugilyProjectsJavaConventionsPlugin
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
implementation-class=PlugilyProjectsJavaConventionsPlugin
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Manifest-Version: 1.0
2+

.github/maven/classic/pom.xml renamed to .github/building/classic/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>minigamesbox</artifactId>
2525
<groupId>plugily.projects</groupId>
26-
<version>1.3.3.1-java8</version>
26+
<version>1.3.17-SNAPSHOT4</version>
2727
</parent>
2828
<modelVersion>4.0.0</modelVersion>
2929

.github/maven/database/pom.xml renamed to .github/building/database/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>minigamesbox</artifactId>
2525
<groupId>plugily.projects</groupId>
26-
<version>1.3.3.1-java8</version>
26+
<version>1.3.17-SNAPSHOT4</version>
2727
</parent>
2828
<modelVersion>4.0.0</modelVersion>
2929

File renamed without changes.
File renamed without changes.
File renamed without changes.

.github/maven/inventory/pom.xml renamed to .github/building/inventory/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>minigamesbox</artifactId>
2525
<groupId>plugily.projects</groupId>
26-
<version>1.3.3.1-java8</version>
26+
<version>1.3.17-SNAPSHOT4</version>
2727
</parent>
2828
<modelVersion>4.0.0</modelVersion>
2929

.github/maven/pom.xml renamed to .github/building/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<groupId>plugily.projects</groupId>
2626
<artifactId>minigamesbox</artifactId>
27-
<version>1.3.3.1-java8</version>
27+
<version>1.3.17-SNAPSHOT4</version>
2828
<packaging>pom</packaging>
2929

3030
<modules>
File renamed without changes.

.github/maven/utils/pom.xml renamed to .github/building/utils/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<artifactId>minigamesbox</artifactId>
2525
<groupId>plugily.projects</groupId>
26-
<version>1.3.3.1-java8</version>
26+
<version>1.3.17-SNAPSHOT4</version>
2727
</parent>
2828
<modelVersion>4.0.0</modelVersion>
2929

.github/workflows/deploy-development.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run: chmod +x gradlew
1515
- name: Bump Version
1616
id: bump
17-
uses: Plugily-Projects/version-bump-action@v8
17+
uses: Plugily-Projects/version-bump-action@v10
1818
with:
1919
github-token: ${{ secrets.github_token }}
2020
auto-version-bump: true

MiniGamesBox API/pom.xml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ MiniGamesBox - Library box with massive content that could be seen as minigames core.
4+
~ Copyright (C) 2023 Plugily Projects - maintained by Tigerpanzer_02 and contributors
5+
~
6+
~ This program is free software: you can redistribute it and/or modify
7+
~ it under the terms of the GNU General Public License as published by
8+
~ the Free Software Foundation, either version 3 of the License, or
9+
~ (at your option) any later version.
10+
~
11+
~ This program is distributed in the hope that it will be useful,
12+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
~ GNU General Public License for more details.
15+
~
16+
~ You should have received a copy of the GNU General Public License
17+
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
-->
19+
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<parent>
24+
<artifactId>minigamesbox</artifactId>
25+
<groupId>plugily.projects</groupId>
26+
<version>1.3.17-SNAPSHOT4</version>
27+
</parent>
28+
<modelVersion>4.0.0</modelVersion>
29+
30+
<artifactId>MiniGamesBox-Api</artifactId>
31+
<properties>
32+
<java.version>1.8</java.version>
33+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
35+
</properties>
36+
37+
38+
<repositories>
39+
<repository>
40+
<id>mojang-repo</id>
41+
<url>https://libraries.minecraft.net/</url>
42+
</repository>
43+
<repository>
44+
<id>simonsators-repo</id>
45+
<url>https://simonsator.de/repo/</url>
46+
</repository>
47+
<repository>
48+
<id>alessiodp-repo</id>
49+
<url>https://repo.alessiodp.com/releases/</url>
50+
</repository>
51+
<repository>
52+
<id>plugilyprojects-repo</id>
53+
<url>https://maven.plugily.xyz/releases</url>
54+
</repository>
55+
<repository>
56+
<id>papi-repo</id>
57+
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
58+
</repository>
59+
</repositories>
60+
61+
<dependencies>
62+
<dependency>
63+
<groupId>plugily.projects</groupId>
64+
<artifactId>MiniGamesBox-Database</artifactId>
65+
<version>${project.version}</version>
66+
<scope>compile</scope>
67+
<optional>true</optional>
68+
</dependency>
69+
<dependency>
70+
<groupId>com.github.cryptomorin</groupId>
71+
<artifactId>XSeries</artifactId>
72+
<version>13.0.0</version>
73+
<optional>true</optional>
74+
</dependency>
75+
</dependencies>
76+
77+
78+
<build>
79+
<plugins>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-javadoc-plugin</artifactId>
83+
<version>3.4.0</version>
84+
<configuration>
85+
<windowtitle>MiniGamesBox Inventory API docs for v${project.version}</windowtitle>
86+
<description>Library box with massive content that could be seen as minigames core.</description>
87+
<destDir>minecraft/minigamesbox/inventory</destDir>
88+
<isOffline>false</isOffline>
89+
</configuration>
90+
</plugin>
91+
</plugins>
92+
<extensions>
93+
<extension>
94+
<groupId>org.apache.maven.wagon</groupId>
95+
<artifactId>wagon-ssh</artifactId>
96+
<version>3.5.2</version>
97+
</extension>
98+
</extensions>
99+
</build>
100+
</project>

0 commit comments

Comments
 (0)