Skip to content

Commit b590d3c

Browse files
author
Francisco Solis
authored
Support for Java 16 (#8)
Added Support for Java 16, fixed/added some tests, added new utilities and more. Full changelog: * Updated .gitignore file * Added Java 16 Support * Added Caching system for some utilities * SLF4J-api and SLF4J-nop is now compiled into SuperCoreAPI * Moved libraries to package xyz.theprogramsrc.supercoreapi.libs * Added util to retrieve Message Digest Instance * Added util to generate checksum from file * Removed placeholder injectors so checksum validation will work * Dependency Manager will only load if the class LibraryLoader exists * Added Utils#hasClass to check if a class exists * Fixed Utils#downloadFile (basically added User Agent) * Fixed some tests
1 parent 70f5865 commit b590d3c

File tree

19 files changed

+379
-427
lines changed

19 files changed

+379
-427
lines changed

.gitignore

Lines changed: 66 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,67 @@
1-
# Files
2-
*.iml
3-
*.jar
4-
5-
# Other Files
6-
dependency-reduced-pom.xml
7-
SuperCoreAPI.iml
8-
9-
# Folders
101
target/
11-
.idea/
2+
pom.xml.tag
3+
pom.xml.releaseBackup
4+
pom.xml.versionsBackup
5+
pom.xml.next
6+
release.properties
7+
dependency-reduced-pom.xml
8+
buildNumber.properties
9+
.mvn/timing.properties
10+
.mvn/wrapper/maven-wrapper.jar
11+
.idea/**/workspace.xml
12+
.idea/**/tasks.xml
13+
.idea/**/usage.statistics.xml
14+
.idea/**/dictionaries
15+
.idea/**/shelf
16+
.idea/**/contentModel.xml
17+
.idea/**/dataSources/
18+
.idea/**/dataSources.ids
19+
.idea/**/dataSources.local.xml
20+
.idea/**/sqlDataSources.xml
21+
.idea/**/dynamic.xml
22+
.idea/**/uiDesigner.xml
23+
.idea/**/dbnavigator.xml
24+
.idea/**/gradle.xml
25+
.idea/**/libraries
26+
cmake-build-*/
27+
.idea/**/mongoSettings.xml
28+
*.iws
29+
out/
30+
.idea_modules/
31+
atlassian-ide-plugin.xml
32+
.idea/replstate.xml
33+
com_crashlytics_export_strings.xml
34+
crashlytics.properties
35+
crashlytics-build.properties
36+
fabric.properties
37+
.idea/httpRequests
38+
.idea/caches/build_file_checksums.ser
39+
*.class
40+
*.log
41+
*.ctxt
42+
.mtj.tmp/
43+
*.jar
44+
*.war
45+
*.nar
46+
*.ear
47+
*.zip
48+
*.tar.gz
49+
*.rar
50+
hs_err_pid*
51+
.DS_Store
52+
.AppleDouble
53+
.LSOverride
54+
Icon
55+
._*
56+
.DocumentRevisions-V100
57+
.fseventsd
58+
.Spotlight-V100
59+
.TemporaryItems
60+
.Trashes
61+
.VolumeIcon.icns
62+
.com.apple.timemachine.donotpresent
63+
.AppleDB
64+
.AppleDesktop
65+
Network Trash Folder
66+
Temporary Items
67+
.apdisk

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SuperCoreAPI
2-
_The best way to create a plugin_<br>![Sonatype Nexus (Repository)](https://img.shields.io/nexus/maven-public/xyz.theprogramsrc/SuperCoreAPI?label=Latest%20Version&server=https%3A%2F%2Frepo.theprogramsrc.xyz) [![Build Status](https://ci.theprogramsrc.xyz/job/MinecraftPlugins/job/SuperCoreAPI/badge/icon)](https://ci.theprogramsrc.xyz/job/SuperCoreAPI/)
2+
_The best way to create a plugin_<br>![Sonatype Nexus (Repository)](https://img.shields.io/nexus/maven-public/xyz.theprogramsrc/SuperCoreAPI?label=Latest%20Version&server=https%3A%2F%2Frepo.theprogramsrc.xyz) [![Build Status](https://ci.theprogramsrc.xyz/job/MinecraftPlugins/job/SuperCoreAPI/badge/icon)](https://ci.theprogramsrc.xyz/job/MinecraftPlugins/job/SuperCoreAPI/)
33
<br>[![Discord](https://i.imgur.com/J1XhmMd.png)](https://go.theprogramsrc.xyz/discord) [![Terms of Service](https://i.imgur.com/4tFAGtE.png)](https://go.theprogramsrc.xyz/tos) [![Wiki](https://i.imgur.com/x0ZMnSx.png)](https://wiki.theprogramsrc.xyz/) [![Become a Patron](https://i.imgur.com/h9Y1X2X.png)](https://go.theprogramsrc.xyz/patreon)
44

55

SuperCoreAPI.iml

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
2+
<module version="4">
33
<component name="FacetManager">
44
<facet type="minecraft" name="Minecraft">
55
<configuration>
@@ -10,58 +10,4 @@
1010
</configuration>
1111
</facet>
1212
</component>
13-
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
14-
<output url="file://$MODULE_DIR$/target/classes" />
15-
<output-test url="file://$MODULE_DIR$/target/test-classes" />
16-
<content url="file://$MODULE_DIR$">
17-
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
18-
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
19-
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
20-
<excludeFolder url="file://$MODULE_DIR$/target" />
21-
</content>
22-
<orderEntry type="inheritedJdk" />
23-
<orderEntry type="sourceFolder" forTests="false" />
24-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT" level="project" />
25-
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
26-
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:21.0" level="project" />
27-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.4" level="project" />
28-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.27" level="project" />
29-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-api:1.16-R0.5-SNAPSHOT" level="project" />
30-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-config:1.16-R0.5-SNAPSHOT" level="project" />
31-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-event:1.16-R0.5-SNAPSHOT" level="project" />
32-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-protocol:1.16-R0.5-SNAPSHOT" level="project" />
33-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:brigadier:1.0.16-SNAPSHOT" level="project" />
34-
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-codec:4.1.63.Final" level="project" />
35-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.sf.trove4j:core:3.1.0" level="project" />
36-
<orderEntry type="library" scope="PROVIDED" name="Maven: se.llbit:jo-nbt:1.3.0" level="project" />
37-
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-transport-native-unix-common:4.1.63.Final" level="project" />
38-
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-common:4.1.63.Final" level="project" />
39-
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-buffer:4.1.63.Final" level="project" />
40-
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-transport:4.1.63.Final" level="project" />
41-
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-resolver:4.1.63.Final" level="project" />
42-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot:1.16.5-R0.1-SNAPSHOT" level="project" />
43-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-nop:1.7.30" level="project" />
44-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
45-
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
46-
<orderEntry type="library" name="Maven: commons-io:commons-io:2.7" level="project" />
47-
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
48-
<orderEntry type="library" scope="PROVIDED" name="Maven: com.zaxxer:HikariCP:3.3.1" level="project" />
49-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.xerial:sqlite-jdbc:3.25.2" level="project" />
50-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-core:2.13.2" level="project" />
51-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-api:2.13.2" level="project" />
52-
<orderEntry type="library" scope="PROVIDED" name="Maven: me.clip:placeholderapi:2.10.9" level="project" />
53-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jetbrains:annotations:19.0.0" level="project" />
54-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.8.0-M1" level="project" />
55-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.8.0-M1" level="project" />
56-
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.1" level="project" />
57-
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
58-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.8.0-M1" level="project" />
59-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.8.0-M1" level="project" />
60-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.8.0-M1" level="project" />
61-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.8.0-M1" level="project" />
62-
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.20" level="project" />
63-
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.4.20" level="project" />
64-
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20" level="project" />
65-
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20" level="project" />
66-
</component>
6713
</module>

dependency-reduced-pom.xml

Lines changed: 21 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>xyz.theprogramsrc</groupId>
55
<artifactId>SuperCoreAPI</artifactId>
66
<name>SuperCoreAPI</name>
7-
<version>4.13.0</version>
7+
<version>5.0.0-Alpha0.2</version>
88
<build>
99
<sourceDirectory>src/main/java</sourceDirectory>
1010
<testSourceDirectory>src/test/java</testSourceDirectory>
@@ -28,7 +28,7 @@
2828
</plugin>
2929
<plugin>
3030
<artifactId>maven-shade-plugin</artifactId>
31-
<version>3.1.0</version>
31+
<version>3.2.4</version>
3232
<executions>
3333
<execution>
3434
<phase>package</phase>
@@ -41,21 +41,36 @@
4141
<relocations>
4242
<relocation>
4343
<pattern>com.google.gson</pattern>
44-
<shadedPattern>xyz.theprogramsrc.supercoreapi.google.gson</shadedPattern>
44+
<shadedPattern>xyz.theprogramsrc.supercoreapi.libs.google.gson</shadedPattern>
45+
</relocation>
46+
<relocation>
47+
<pattern>org.apache.commons.io</pattern>
48+
<shadedPattern>xyz.theprogramsrc.supercoreapi.libs.apache.commons.io</shadedPattern>
4549
</relocation>
4650
<relocation>
4751
<pattern>org.apache.commons.codec</pattern>
48-
<shadedPattern>xyz.theprogramsrc.supercoreapi.apache.commons.codec</shadedPattern>
52+
<shadedPattern>xyz.theprogramsrc.supercoreapi.libs.apache.commons.codec</shadedPattern>
4953
</relocation>
5054
<relocation>
51-
<pattern>org.apache.commons.io</pattern>
52-
<shadedPattern>xyz.theprogramsrc.supercoreapi.apache.commons.io</shadedPattern>
55+
<pattern>org.slf4j</pattern>
56+
<shadedPattern>xyz.theprogramsrc.supercoreapi.libs.slf4j</shadedPattern>
5357
</relocation>
5458
</relocations>
5559
</configuration>
5660
</execution>
5761
</executions>
5862
</plugin>
63+
<plugin>
64+
<artifactId>maven-jar-plugin</artifactId>
65+
<version>2.4</version>
66+
<configuration>
67+
<archive>
68+
<manifest>
69+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
70+
</manifest>
71+
</archive>
72+
</configuration>
73+
</plugin>
5974
<plugin>
6075
<artifactId>maven-surefire-plugin</artifactId>
6176
<version>2.22.1</version>
@@ -98,79 +113,19 @@
98113
<artifactId>spigot-api</artifactId>
99114
<version>1.16.5-R0.1-SNAPSHOT</version>
100115
<scope>provided</scope>
101-
<exclusions>
102-
<exclusion>
103-
<artifactId>commons-lang</artifactId>
104-
<groupId>commons-lang</groupId>
105-
</exclusion>
106-
<exclusion>
107-
<artifactId>guava</artifactId>
108-
<groupId>com.google.guava</groupId>
109-
</exclusion>
110-
<exclusion>
111-
<artifactId>bungeecord-chat</artifactId>
112-
<groupId>net.md-5</groupId>
113-
</exclusion>
114-
<exclusion>
115-
<artifactId>snakeyaml</artifactId>
116-
<groupId>org.yaml</groupId>
117-
</exclusion>
118-
</exclusions>
119116
</dependency>
120117
<dependency>
121118
<groupId>net.md-5</groupId>
122119
<artifactId>bungeecord-api</artifactId>
123120
<version>1.16-R0.5-SNAPSHOT</version>
124121
<scope>provided</scope>
125-
<exclusions>
126-
<exclusion>
127-
<artifactId>bungeecord-config</artifactId>
128-
<groupId>net.md-5</groupId>
129-
</exclusion>
130-
<exclusion>
131-
<artifactId>bungeecord-event</artifactId>
132-
<groupId>net.md-5</groupId>
133-
</exclusion>
134-
<exclusion>
135-
<artifactId>bungeecord-protocol</artifactId>
136-
<groupId>net.md-5</groupId>
137-
</exclusion>
138-
<exclusion>
139-
<artifactId>netty-transport-native-unix-common</artifactId>
140-
<groupId>io.netty</groupId>
141-
</exclusion>
142-
<exclusion>
143-
<artifactId>bungeecord-chat</artifactId>
144-
<groupId>net.md-5</groupId>
145-
</exclusion>
146-
<exclusion>
147-
<artifactId>snakeyaml</artifactId>
148-
<groupId>org.yaml</groupId>
149-
</exclusion>
150-
<exclusion>
151-
<artifactId>guava</artifactId>
152-
<groupId>com.google.guava</groupId>
153-
</exclusion>
154-
</exclusions>
155122
</dependency>
156123
<dependency>
157124
<groupId>org.spigotmc</groupId>
158125
<artifactId>spigot</artifactId>
159126
<version>1.16.5-R0.1-SNAPSHOT</version>
160127
<scope>provided</scope>
161128
</dependency>
162-
<dependency>
163-
<groupId>org.slf4j</groupId>
164-
<artifactId>slf4j-nop</artifactId>
165-
<version>1.7.30</version>
166-
<scope>provided</scope>
167-
</dependency>
168-
<dependency>
169-
<groupId>org.slf4j</groupId>
170-
<artifactId>slf4j-api</artifactId>
171-
<version>1.7.25</version>
172-
<scope>provided</scope>
173-
</dependency>
174129
<dependency>
175130
<groupId>com.zaxxer</groupId>
176131
<artifactId>HikariCP</artifactId>
@@ -188,24 +143,12 @@
188143
<artifactId>log4j-core</artifactId>
189144
<version>2.13.2</version>
190145
<scope>provided</scope>
191-
<exclusions>
192-
<exclusion>
193-
<artifactId>log4j-api</artifactId>
194-
<groupId>org.apache.logging.log4j</groupId>
195-
</exclusion>
196-
</exclusions>
197146
</dependency>
198147
<dependency>
199148
<groupId>me.clip</groupId>
200149
<artifactId>placeholderapi</artifactId>
201150
<version>2.10.9</version>
202151
<scope>provided</scope>
203-
<exclusions>
204-
<exclusion>
205-
<artifactId>annotations</artifactId>
206-
<groupId>org.jetbrains</groupId>
207-
</exclusion>
208-
</exclusions>
209152
</dependency>
210153
<dependency>
211154
<groupId>org.junit.jupiter</groupId>
@@ -243,4 +186,3 @@
243186
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
244187
</properties>
245188
</project>
246-

pom.xml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>xyz.theprogramsrc</groupId>
88
<artifactId>SuperCoreAPI</artifactId>
9-
<version>4.13.0</version>
9+
<version>5.0.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>SuperCoreAPI</name>
@@ -35,7 +35,7 @@
3535
<plugin>
3636
<groupId>org.apache.maven.plugins</groupId>
3737
<artifactId>maven-shade-plugin</artifactId>
38-
<version>3.1.0</version>
38+
<version>3.2.4</version>
3939
<executions>
4040
<execution>
4141
<phase>package</phase>
@@ -48,21 +48,38 @@
4848
<relocations>
4949
<relocation>
5050
<pattern>com.google.gson</pattern>
51-
<shadedPattern>xyz.theprogramsrc.supercoreapi.google.gson</shadedPattern>
51+
<shadedPattern>xyz.theprogramsrc.supercoreapi.libs.google.gson</shadedPattern>
52+
</relocation>
53+
<relocation>
54+
<pattern>org.apache.commons.io</pattern>
55+
<shadedPattern>xyz.theprogramsrc.supercoreapi.libs.apache.commons.io</shadedPattern>
5256
</relocation>
5357
<relocation>
5458
<pattern>org.apache.commons.codec</pattern>
55-
<shadedPattern>xyz.theprogramsrc.supercoreapi.apache.commons.codec</shadedPattern>
59+
<shadedPattern>xyz.theprogramsrc.supercoreapi.libs.apache.commons.codec</shadedPattern>
5660
</relocation>
5761
<relocation>
58-
<pattern>org.apache.commons.io</pattern>
59-
<shadedPattern>xyz.theprogramsrc.supercoreapi.apache.commons.io</shadedPattern>
62+
<pattern>org.slf4j</pattern>
63+
<shadedPattern>xyz.theprogramsrc.supercoreapi.libs.slf4j</shadedPattern>
6064
</relocation>
6165
</relocations>
6266
</configuration>
6367
</execution>
6468
</executions>
6569
</plugin>
70+
<!-- Maven Jar Plugin -->
71+
<plugin>
72+
<groupId>org.apache.maven.plugins</groupId>
73+
<artifactId>maven-jar-plugin</artifactId>
74+
<version>2.4</version>
75+
<configuration>
76+
<archive>
77+
<manifest>
78+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
79+
</manifest>
80+
</archive>
81+
</configuration>
82+
</plugin>
6683
<!-- Unit Testing -->
6784
<plugin>
6885
<groupId>org.apache.maven.plugins</groupId>
@@ -154,13 +171,13 @@
154171
<groupId>org.slf4j</groupId>
155172
<artifactId>slf4j-nop</artifactId>
156173
<version>1.7.30</version>
157-
<scope>provided</scope>
174+
<scope>compile</scope>
158175
</dependency>
159176
<dependency>
160177
<groupId>org.slf4j</groupId>
161178
<artifactId>slf4j-api</artifactId>
162179
<version>1.7.25</version>
163-
<scope>provided</scope>
180+
<scope>compile</scope>
164181
</dependency>
165182
<!-- COMMONS -->
166183
<dependency>

0 commit comments

Comments
 (0)