Use org.reflections to get all subclass of MineClassImpl in order to avoid the declaration inside the MineClassFactory

This commit is contained in:
Barazok
2020-10-26 01:08:08 +01:00
parent fbbd602333
commit 504db76550
8 changed files with 42 additions and 7 deletions

View File

@@ -1,5 +1,16 @@
import org.apache.tools.ant.filters.ReplaceTokens
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
}
}
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
group = 'net.babamod'
@@ -22,6 +33,7 @@ repositories {
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.16.3-R0.1-SNAPSHOT'
compile group: 'org.reflections', name: 'reflections', version: '0.9.10'
}
processResources {
@@ -29,3 +41,15 @@ processResources {
filter ReplaceTokens, tokens: [version: version]
}
}
shadowJar {
archiveBaseName.set('mineclass')
archiveClassifier.set('')
archiveVersion.set('')
}
task relocateShadowJar(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
}
tasks.shadowJar.dependsOn tasks.relocateShadowJar