File tree Expand file tree Collapse file tree 11 files changed +91
-123
lines changed
kotlin/xyz/theprogramsrc/filesmodule
test/kotlin/xyz/theprogramsrc/filesmodule/config Expand file tree Collapse file tree 11 files changed +91
-123
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ val env = project.rootProject.file(".env").let { file ->
1515 if (file.exists()) file.readLines().filter { it.isNotBlank() && ! it.startsWith(" #" ) && it.split(" =" ).size == 2 }.associate { it.split(" =" )[0 ] to it.split(" =" )[1 ] } else emptyMap()
1616}.toMutableMap().apply { putAll(System .getenv()) }
1717
18- val projectVersion = env[" VERSION" ] ? : " 0.3 .0-SNAPSHOT"
18+ val projectVersion = env[" VERSION" ] ? : " 0.4 .0-SNAPSHOT"
1919
2020group = " xyz.theprogramsrc"
2121version = projectVersion
@@ -33,7 +33,7 @@ repositories {
3333}
3434
3535dependencies {
36- compileOnly(" xyz.theprogramsrc:simplecoreapi:0.6.2 -SNAPSHOT" )
36+ compileOnly(" xyz.theprogramsrc:simplecoreapi:0.8.0 -SNAPSHOT" )
3737
3838 implementation(" me.carleslc.Simple-YAML:Simple-Yaml:1.8.4" )
3939
@@ -171,14 +171,16 @@ publishing {
171171 }
172172}
173173
174- nexusPublishing {
175- repositories {
176- sonatype {
177- nexusUrl.set(uri(" https://s01.oss.sonatype.org/service/local/" ))
178- snapshotRepositoryUrl.set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
174+ if (env[" ENV" ] == " prod" ) {
175+ nexusPublishing {
176+ repositories {
177+ sonatype {
178+ nexusUrl.set(uri(" https://s01.oss.sonatype.org/service/local/" ))
179+ snapshotRepositoryUrl.set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
179180
180- username.set(env[" SONATYPE_USERNAME" ])
181- password.set(env[" SONATYPE_PASSWORD" ])
181+ username.set(env[" SONATYPE_USERNAME" ])
182+ password.set(env[" SONATYPE_PASSWORD" ])
183+ }
182184 }
183185 }
184186}
Original file line number Diff line number Diff line change 1+ package xyz.theprogramsrc.filesmodule
2+
3+ import xyz.theprogramsrc.simplecoreapi.global.models.module.Module
4+ import xyz.theprogramsrc.simplecoreapi.global.models.module.ModuleDescription
5+
6+ class FilesModule : Module {
7+
8+ override val description: ModuleDescription =
9+ ModuleDescription (
10+ name = " @name@" ,
11+ version = " @version@" ,
12+ authors = listOf (" Im-Fran" )
13+ )
14+
15+ override fun onDisable () {
16+ TODO (" Not yet implemented" )
17+ }
18+
19+ override fun onEnable () {
20+ TODO (" Not yet implemented" )
21+ }
22+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11package xyz.theprogramsrc.filesmodule.config
22
33import com.google.gson.*
4- import xyz.theprogramsrc.filesmodule. utils.file
4+ import xyz.theprogramsrc.simplecoreapi.global. utils.extensions .file
55import java.io.File
66
77/* *
Original file line number Diff line number Diff line change 11package xyz.theprogramsrc.filesmodule.config
22
3- import xyz.theprogramsrc.filesmodule. utils.file
3+ import xyz.theprogramsrc.simplecoreapi.global. utils.extensions .file
44import java.io.File
55import java.util.*
66
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package xyz.theprogramsrc.filesmodule.config
22
33import org.simpleyaml.configuration.ConfigurationSection
44import org.simpleyaml.configuration.file.YamlConfiguration
5- import xyz.theprogramsrc.filesmodule. utils.file
5+ import xyz.theprogramsrc.simplecoreapi.global. utils.extensions .file
66import java.io.File
77
88/* *
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -8,22 +8,6 @@ import java.io.File
88
99internal class JsonConfigTest {
1010
11- companion object {
12- private val config = JsonConfig (File (" test.json" ))
13-
14- @BeforeAll
15- fun setUp () {
16- config.destroy()
17- config.load()
18- }
19-
20- @AfterAll
21- fun tearDown () {
22- config.destroy()
23- }
24-
25- }
26-
2711 @Test
2812 fun has () {
2913 assertFalse(config.has(" test" ))
@@ -81,4 +65,22 @@ internal class JsonConfigTest {
8165 assertEquals(3 as Number , config.getNumber(" addNumber" ))
8266 config.remove(" addNumber" )
8367 }
68+
69+ companion object {
70+ private val config = JsonConfig (File (" test.json" ))
71+
72+ @JvmStatic
73+ @BeforeAll
74+ fun setUp () {
75+ config.destroy()
76+ config.load()
77+ }
78+
79+ @JvmStatic
80+ @AfterAll
81+ fun tearDown () {
82+ config.destroy()
83+ }
84+
85+ }
8486}
Original file line number Diff line number Diff line change @@ -8,22 +8,6 @@ import java.io.File
88
99internal class PropertiesConfigTest {
1010
11- companion object {
12- private val config = PropertiesConfig (File (" test.properties" ))
13-
14- @BeforeAll
15- fun setUp () {
16- config.destroy()
17- config.load()
18- }
19-
20- @AfterAll
21- fun tearDown () {
22- config.destroy()
23- }
24-
25- }
26-
2711 @Test
2812 fun has () {
2913 assertFalse(config.has(" test" ))
@@ -56,4 +40,23 @@ internal class PropertiesConfigTest {
5640 assertNull(config.get(" test" ))
5741 assertFalse(config.has(" test" ))
5842 }
43+
44+ companion object {
45+ private val config = PropertiesConfig (File (" test.properties" ))
46+
47+ @JvmStatic
48+ @BeforeAll
49+ fun setUp () {
50+ config.destroy()
51+ config.load()
52+ }
53+
54+ @JvmStatic
55+ @AfterAll
56+ fun tearDown () {
57+ config.destroy()
58+ }
59+
60+ }
61+
5962}
You can’t perform that action at this time.
0 commit comments