Skip to content

Commit dc618e7

Browse files
author
Francisco Solis
authored
Merge pull request #31 from TheProgramSrc/patch/update-depends
2 parents e267430 + 9292336 commit dc618e7

6 files changed

Lines changed: 47 additions & 10 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ bin/
7777
*.pom.xml
7878
modules/
7979
!gradle-wrapper.jar
80+
plugins/
81+
translations/

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# v0.1.6 - Snapshot
2+
* Updated depends
3+
* Moved to JitCI
4+
* Improve testing to avoid unwanted files committed
5+
16
# v0.1.5 - Snapshot
27
* Now translations are automatically colorized (unless you set `colorize` to `false`)
38
* Updated tests

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
[![](https://jitci.com/gh/TheProgramSrc/SimpleCore-TranslationsModule/svg)](https://jitci.com/gh/TheProgramSrc/SimpleCore-TranslationsModule)
2+
[![](https://jitpack.io/v/xyz.theprogramsrc/SimpleCore-TranslationsModule.svg)](https://jitpack.io/#xyz.theprogramsrc/SimpleCore-TranslationsModule)
3+
14
# SimpleCore-TranslationsModule
25
Translations module for SimpleCore API.
36

47
# Documentation
58
* [Wiki](https://github.com/TheProgramSrc/SimpleCore-TranslationsModule/wiki)
6-
* [JavaDocs](https://theprogramsrc.github.io/SimpleCore-TranslationsModule/)
9+
* [JavaDocs](https://docs.theprogramsrc.xyz/SimpleCore-TranslationsModule/)

build.gradle

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import org.apache.tools.ant.filters.ReplaceTokens
2-
31
plugins {
42
id 'org.jetbrains.kotlin.jvm' version '1.7.20'
53
id 'maven-publish'
64
id 'com.github.johnrengelman.shadow' version '7.1.2'
5+
id 'cl.franciscosolis.blossom-extended' version '1.3.1'
76
id 'org.jetbrains.dokka' version '1.7.20'
87
}
98

10-
def projectVersion = (System.getenv("VERSION") ?: '0.1.5-SNAPSHOT').replaceFirst("v", "").replace('/', '')
9+
def projectVersion = (System.getenv("VERSION") ?: '0.1.6-SNAPSHOT').replaceFirst("v", "").replace('/', '')
1110

1211
group 'xyz.theprogramsrc'
1312
version projectVersion
@@ -56,8 +55,12 @@ java {
5655
withSourcesJar()
5756
}
5857

59-
processResources {
60-
filter ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description, git_short: System.getenv("GIT_COMMIT_SHORT_HASH") ?: "unknown", git_full: System.getenv("GIT_COMMIT_LONG_HASH") ?: "unknown"]
58+
blossom {
59+
replaceToken '@name@', rootProject.name
60+
replaceToken '@version@', project.version.toString()
61+
replaceToken '@description@', project.description
62+
replaceToken '@git_short@', System.getenv("GIT_COMMIT_SHORT_HASH") ?: "unknown"
63+
replaceToken '@git_full@', System.getenv("GIT_COMMIT_LONG_HASH") ?: "unknown"
6164
}
6265

6366
tasks.withType(JavaCompile) {
@@ -86,10 +89,12 @@ publishing {
8689
repositories {
8790
if(System.getenv('env') == 'prod'){
8891
maven {
89-
name = 'TheProgramSrcRepository'
90-
credentials.username = System.getenv('NEXUS_USERNAME')
91-
credentials.password = System.getenv('NEXUS_PASSWORD')
92-
url = uri("https://repo.theprogramsrc.xyz/repository/simplecoreapi-modules/")
92+
name = 'GitHubPackages'
93+
url = 'https://maven.pkg.github.com/TheProgramSrc/SimpleCore-TasksModule'
94+
credentials {
95+
username = System.getenv('GITHUB_ACTOR')
96+
password = System.getenv('GITHUB_TOKEN')
97+
}
9398
}
9499
}else{
95100
mavenLocal()

src/test/kotlin/xyz/theprogramsrc/translationsmodule/TranslationColorTest.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package xyz.theprogramsrc.translationsmodule
22

33
import org.junit.jupiter.api.Assertions.assertEquals
4+
import org.junit.jupiter.api.AfterAll
45
import org.junit.jupiter.api.BeforeAll
6+
import org.junit.jupiter.api.BeforeEach
57
import org.junit.jupiter.api.Test
8+
import java.io.File
69

710
internal class TranslationColorTest {
811

@@ -13,6 +16,17 @@ internal class TranslationColorTest {
1316
TranslationManager()
1417
}
1518

19+
@AfterAll
20+
@JvmStatic
21+
fun tearDown() {
22+
File("translations").deleteRecursively()
23+
File("plugins").deleteRecursively()
24+
}
25+
}
26+
27+
@BeforeEach
28+
fun beforeEach() {
29+
File("translations").deleteRecursively()
1630
}
1731

1832
@Test

src/test/kotlin/xyz/theprogramsrc/translationsmodule/TranslationManagerTest.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package xyz.theprogramsrc.translationsmodule
22

33
import org.junit.jupiter.api.Assertions.assertFalse
44
import org.junit.jupiter.api.Assertions.assertTrue
5+
import org.junit.jupiter.api.AfterAll
56
import org.junit.jupiter.api.BeforeAll
67
import org.junit.jupiter.api.BeforeEach
78
import org.junit.jupiter.api.Test
@@ -15,6 +16,13 @@ internal class TranslationManagerTest {
1516
fun setUp() {
1617
TranslationManager()
1718
}
19+
20+
@AfterAll
21+
@JvmStatic
22+
fun tearDown() {
23+
File("translations").deleteRecursively()
24+
File("plugins").deleteRecursively()
25+
}
1826
}
1927

2028
@BeforeEach

0 commit comments

Comments
 (0)