Skip to content

Commit

Permalink
Rename "configFilePath" to "configurationFilePath" in GradmExtension (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Omico authored Aug 9, 2023
1 parent da9aef9 commit 9993864
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ You can modify the Gradm configuration file name in `gradm/build.gradle.kts`:

```kotlin
gradm {
configFilePath = "gradm3.yml" // default: "gradm.yml"
configurationFilePath = "gradm3.yml" // default: "gradm.yml"
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-Hans/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ gradm {

```kotlin
gradm {
configFilePath = "gradm3.yml" // 默认为 "gradm.yml"
configurationFilePath = "gradm3.yml" // 默认为 "gradm.yml"
}
```

Expand Down
2 changes: 1 addition & 1 deletion examples/gradm-getting-started/gradm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repositories {

gradm {
pluginId = "gradm" // default: "me.omico.gradm.generated"
configFilePath = "gradm3.yml" // default: "gradm.yml"
configurationFilePath = "gradm3.yml" // default: "gradm.yml"
debug = true // default: false
format {
enabled = true // default: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ internal abstract class GradmExtensionImpl @Inject constructor(

override var pluginId: String by pluginDeclaration::id

override var configFilePath: String
override var configurationFilePath: String
get() = configFileProperty.asFile.getOrElse(project.file("gradm.yml")).absolutePath
set(value) {
val file = project.file(value)
require(file.exists()) { "The path you assign for the Gradm config file does not exist." }
require(file.isFile) { "Gradm config file must be a file." }
require(file.exists()) { "Gradm configuration file does not exist in ${file.absolutePath}." }
require(file.isFile) { "Gradm configuration file must be a file." }
configFileProperty.set(file)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ abstract class GradmTask : DefaultTask() {
offlineProperty.set(gradle.startParameter.isOffline)
workerServiceProperty.set(gradmWorkerServiceProvider)
projectNameProperty.set(gradmExtension.projectName)
configurationFileProperty.set(projectLayout.gradmConfigurationFile(gradmExtension.configFilePath))
configurationFileProperty.set(projectLayout.gradmConfigurationFile(gradmExtension.configurationFilePath))
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ interface GradmExtension : ExtensionAware {
var pluginId: String

/**
* The Gradm config file path.
* The Gradm configuration file path.
*
* The default value is `./gradm.yml`.
*/
var configFilePath: String
var configurationFilePath: String

/**
* Enable debug mode for Gradm.
Expand Down

0 comments on commit 9993864

Please sign in to comment.