-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into display-suites
- Loading branch information
Showing
3 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/main/kotlin/io/github/platan/tests_execution_chart/gradle/config/formats/Script.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
package io.github.platan.tests_execution_chart.gradle.config.formats | ||
|
||
import io.github.platan.tests_execution_chart.reporters.html.HtmlConfig | ||
import org.gradle.api.Action | ||
import org.gradle.api.model.ObjectFactory | ||
import org.gradle.api.provider.Property | ||
import org.gradle.api.tasks.Input | ||
import org.gradle.api.tasks.Nested | ||
import javax.inject.Inject | ||
|
||
const val DEFAULT_MERMAID_SCRIPT_SRC = "https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js" | ||
|
||
abstract class Script @Inject constructor(objectFactory: ObjectFactory) { | ||
|
||
@get:Input | ||
val src: Property<String> = objectFactory.property(String::class.java).convention(DEFAULT_MERMAID_SCRIPT_SRC) | ||
val src: Property<String> = objectFactory.property(String::class.java).convention(HtmlConfig.Script.getSrcDefault()) | ||
|
||
@get:Input | ||
val embed: Property<Boolean> = objectFactory.property(Boolean::class.java).convention(false) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,14 @@ import io.github.platan.tests_execution_chart.report.ReportConfig | |
data class HtmlConfig(override val enabled: Boolean, override val outputLocation: String, val script: Script) : | ||
ReportConfig.Format { | ||
data class Script(val src: String, val embed: Boolean, val options: Options) { | ||
|
||
companion object { | ||
private const val DEFAULT_MERMAID_SCRIPT_SRC = | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js" | ||
|
||
fun getSrcDefault(): String = DEFAULT_MERMAID_SCRIPT_SRC | ||
} | ||
|
||
data class Options(val maxTextSize: Int) | ||
} | ||
} |