2022-06-17 00:22:47 -04:00
plugins {
id ( " java " )
}
2022-06-17 20:01:15 -04:00
group = " net.nuggetmc "
2022-11-06 15:16:12 -05:00
version = " 3.4-BETA "
2022-06-17 00:22:47 -04:00
2022-06-17 20:01:15 -04:00
val jarName = " TerminatorPlus- " + version ;
2022-06-17 00:22:47 -04:00
repositories {
mavenCentral ( )
}
dependencies {
2022-06-17 21:09:08 -04:00
implementation ( project ( " :TerminatorPlus-Plugin " , " reobf " ) )
2022-06-17 20:01:15 -04:00
implementation ( project ( " :TerminatorPlus-API " ) )
}
2022-06-17 21:16:00 -04:00
tasks . processResources {
val props = mapOf ( " version " to version )
inputs . properties ( props )
filteringCharset = Charsets . UTF _8 . name ( ) // We want UTF-8 for everything
filesMatching ( " plugin.yml " ) {
expand ( props )
}
}
2022-06-17 20:01:15 -04:00
tasks . jar {
from ( configurations . compileClasspath . get ( ) . map { if ( it . isDirectory ( ) ) it else zipTree ( it ) } )
archiveFileName . set ( jarName + " .jar " )
}
2022-06-17 21:16:00 -04:00
2022-06-17 21:09:08 -04:00
//TODO currently, the resources are in src/main/resources, because gradle is stubborn and won't include the resources in TerminatorPlus-Plugin/src/main/resources, will need to fix
2022-06-17 00:22:47 -04:00
2022-06-17 20:01:15 -04:00
/ *
task copyPlugin ( type : Copy ) {
from ' build / libs / ' + jarName + ' . jar '
into ' run / plugins '
2022-06-17 00:22:47 -04:00
}
2022-06-17 20:01:15 -04:00
* /
2022-06-17 00:22:47 -04:00
2022-06-17 20:01:15 -04:00
tasks . register ( " copyPlugin " , Copy :: class . java ) {
from ( " build/libs/ " + jarName + " .jar " )
into ( " run/plugins " )
2022-06-17 00:22:47 -04:00
}