Skip to content

Commit c0b5c03

Browse files
committed
refactor(configuration): Reorder properties in Configuration data class and update documentation.
1 parent e49db16 commit c0b5c03

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

bindings/src/main/kotlin/io/github/ayfri/kore/bindings/api/Configuration.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import kotlin.io.path.Path
88
* This will be the default configuration unless overridden per datapack.
99
*/
1010
data class ImportConfiguration(
11+
var debug: Boolean = false,
12+
var generateSingleFile: Boolean = true,
1113
var outputPath: Path = Path("build/generated/kore/imported"),
1214
var packagePrefix: String = "kore.dependencies",
13-
var generateSingleFile: Boolean = true,
1415
var skipCache: Boolean = false,
15-
var debug: Boolean = false,
1616
) {
1717
/**
1818
* Sets the output path for generated Kotlin files.
@@ -34,6 +34,14 @@ data class ImportConfiguration(
3434
* Can override global configuration for specific datapacks.
3535
*/
3636
class DatapackConfiguration {
37+
/**
38+
* Exclude files matching these glob patterns.
39+
*/
40+
var excludes: List<String> = emptyList()
41+
/**
42+
* Include only files matching these glob patterns.
43+
*/
44+
var includes: List<String> = emptyList()
3745
/**
3846
* Override the package name for a specific datapack.
3947
*/
@@ -46,12 +54,4 @@ class DatapackConfiguration {
4654
* Select a subfolder within the downloaded datapack.
4755
*/
4856
var subPath: String? = null
49-
/**
50-
* Include only files matching these glob patterns.
51-
*/
52-
var includes: List<String> = emptyList()
53-
/**
54-
* Exclude files matching these glob patterns.
55-
*/
56-
var excludes: List<String> = emptyList()
5757
}

kore/src/main/kotlin/io/github/ayfri/kore/Configuration.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ package io.github.ayfri.kore
66
*
77
* Docs: https://kore.ayfri.com/docs/configuration
88
*
9+
* @property generateCommentOfGeneratedFunctionCall - Whether to include a comment when an implicit generated function is called
10+
* @property generatedFunctionsFolder - The folder where the generated functions are stored. Defaults to "generated_scopes".
911
* @property prettyPrint - Whether to pretty print generated JSON
1012
* @property prettyPrintIndent - String used for indentation when pretty printing
11-
* @property generatedFunctionsFolder - The folder where the generated functions are stored. Defaults to "generated_scopes".
12-
* @property generateCommentOfGeneratedFunctionCall - Whether to include a comment when an implicit generated function is called
1313
*/
1414
data class Configuration(
15+
var generateCommentOfGeneratedFunctionCall: Boolean = DEFAULT.generateCommentOfGeneratedFunctionCall,
16+
var generatedFunctionsFolder: String = DEFAULT.generatedFunctionsFolder,
1517
var prettyPrint: Boolean = DEFAULT.prettyPrint,
1618
var prettyPrintIndent: String = DEFAULT.prettyPrintIndent,
17-
var generatedFunctionsFolder: String = DEFAULT.generatedFunctionsFolder,
18-
var generateCommentOfGeneratedFunctionCall: Boolean = DEFAULT.generateCommentOfGeneratedFunctionCall,
1919
) {
2020
companion object {
2121
/** Default configuration instance. */

0 commit comments

Comments
 (0)