Skip to content

Commit 8eb1d90

Browse files
committed
Added JsonHelper.kt with jsonInstance.
Updated version number to 1.0.3.2. Signed-off-by: Pavel Erokhin (MairwunNx) <[email protected]>
1 parent 40cdae3 commit 8eb1d90

File tree

8 files changed

+46
-8
lines changed

8 files changed

+46
-8
lines changed

build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,10 @@ sourceCompatibility = targetCompatibility =
158158

159159
compileKotlin.kotlinOptions.jvmTarget =
160160
compileTestKotlin.kotlinOptions.jvmTarget = project_jvm_version_target
161+
162+
//noinspection GroovyAssignabilityCheck
163+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
164+
kotlinOptions {
165+
freeCompilerArgs += "-Xuse-experimental=kotlin.Experimental"
166+
}
167+
}

documentation/for-developers.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies {
1111
compile(
1212
group: "com.github.projectessentials",
1313
name: "ProjectEssentials-Core",
14-
version: "v1.14.4-1.0.3.1"
14+
version: "v1.14.4-1.0.3.2"
1515
)
1616
}
1717
```
@@ -127,6 +127,14 @@ ModPathHelper.MOD_CONFIG_FOLDER
127127
- description: Project Essentials mod config folder.
128128
```
129129

130+
```
131+
JsonHelper.jsonInstance
132+
133+
- return: json instance with configured JsonConfiguration. (Json)
134+
135+
- description: Common json instance with default configuration for Project Essentials modules, if module using json configuration, then you need use this property.
136+
```
137+
130138
### Dependencies using by Core API.
131139

132140
```

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ project_jvm_version_target=1.8
1414
kotlin_version=1.3.61
1515
kotlinx_serialization_version=0.14.0
1616
dokka_version=0.10.0
17-
module_version=1.14.4-1.0.3.1
17+
module_version=1.14.4-1.0.3.2
1818
module_name=Project Essentials Core
1919
module_id=project_essentials_core
2020
module_vendor=MairwunNx (Pavel Erokhin)

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is the base module (core) for all other Project Essentials modules. It cont
88

99
### Last steps
1010

11-
#### [Download mod](https://github.com/ProjectEssentials/ProjectEssentials-Core/releases/download/v1.14.4-1.0.3.1/ProjectEssentials-Core-MOD-1.14.4-1.0.3.1.jar) · [Download API](https://github.com/ProjectEssentials/ProjectEssentials-Core/releases/download/v1.14.4-1.0.3.1/ProjectEssentials-Core-API-1.14.4-1.0.3.1.jar) · [How to install](documentation/for-players.md) · [Troubleshooting](https://github.com/ProjectEssentials/ProjectEssentials-Core/issues/new/choose) · [News & updates](https://t.me/minecraftforge)
11+
#### [Download mod](https://github.com/ProjectEssentials/ProjectEssentials-Core/releases/download/v1.14.4-1.0.3.2/ProjectEssentials-Core-MOD-1.14.4-1.0.3.2.jar) · [Download API](https://github.com/ProjectEssentials/ProjectEssentials-Core/releases/download/v1.14.4-1.0.3.2/ProjectEssentials-Core-API-1.14.4-1.0.3.2.jar) · [How to install](documentation/for-players.md) · [Troubleshooting](https://github.com/ProjectEssentials/ProjectEssentials-Core/issues/new/choose) · [News & updates](https://t.me/minecraftforge)
1212

1313
<a href="https://ko-fi.com/mairwunnx" target="_blank"><img src="./assets/support_social.png"></a>
1414

src/main/kotlin/com/mairwunnx/projectessentials/core/EntryPoint.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import net.minecraftforge.fml.common.Mod
77
internal class EntryPoint : EssBase() {
88
init {
99
modInstance = this
10-
modVersion = "1.14.4-1.0.3.1"
10+
modVersion = "1.14.4-1.0.3.2"
1111
logBaseInfo()
1212
validateForgeVersion()
1313
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@file:Suppress("unused")
2+
3+
package com.mairwunnx.projectessentials.core.helpers
4+
5+
import kotlinx.serialization.UnstableDefault
6+
import kotlinx.serialization.json.Json
7+
import kotlinx.serialization.json.JsonConfiguration
8+
9+
/**
10+
* Common json instance with default configuration
11+
* for Project Essentials modules, if module using
12+
* json configuration, then you need use this property.
13+
* @since 1.14.4-1.0.3.2
14+
*/
15+
@UseExperimental(UnstableDefault::class)
16+
val jsonInstance = Json(
17+
JsonConfiguration(
18+
strictMode = false,
19+
allowStructuredMapKeys = true,
20+
prettyPrint = true
21+
)
22+
)

src/main/resources/META-INF/mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ issueTrackerURL="https://github.com/ProjectEssentials/ProjectEssentials-Core/iss
55

66
[[mods]]
77
modId="project_essentials_core"
8-
version="1.14.4-1.0.3.1"
8+
version="1.14.4-1.0.3.2"
99
displayName="Project Essentials Core"
1010
updateJSONURL="https://raw.githubusercontent.com/ProjectEssentials/ProjectEssentials-Core/MC-1.14.4/update.json"
1111
displayURL="https://github.com/ProjectEssentials/ProjectEssentials-Core"

update.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
2-
"homepage": "https://github.com/ProjectEssentials/ProjectEssentials-Core/releases/tag/v1.14.4-1.0.3.0",
2+
"homepage": "https://github.com/ProjectEssentials/ProjectEssentials-Core/releases/tag/v1.14.4-1.0.3.2",
33
"1.14.4": {
4+
"1.14.4-1.0.3.2": " - Added JsonHelper.kt with jsonInstance.",
45
"1.14.4-1.0.3.1": " - Package name changed to correctly.\n - Added empty line after startup message.\n - Added logo file.\n - Fixed `cr` symbols in mod info.",
56
"1.14.4-1.0.3.0": " - Bumped kotlin, kotlinx serialization and forge version.\n - Improved build script.\n - Bumped dokka version. \n - Added compatibility with forge 28.1.X. \n - Improved logging on mod startup and on forge version incompatibility.",
67
"1.14.4-1.0.2.0": " - Fixed crash while dependency using CoreAPI."
78
},
89
"promos": {
9-
"1.14.4-latest": "1.14.4-1.0.3.0",
10-
"1.14.4-recommended": "1.14.4-1.0.3.0"
10+
"1.14.4-latest": "1.14.4-1.0.3.2",
11+
"1.14.4-recommended": "1.14.4-1.0.3.2"
1112
}
1213
}

0 commit comments

Comments
 (0)