Skip to content

Commit c7230d5

Browse files
Fix ktlint errors
1 parent e438a0e commit c7230d5

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

src/main/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserExtension.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ import org.gradle.api.provider.Provider
4141
* It provides options for specifying the JxBrowser version, repository location,
4242
* and various JxBrowser dependencies based on your project's needs.
4343
*/
44-
public open class JxBrowserExtension(private val project: Project) {
44+
public open class JxBrowserExtension(
45+
private val project: Project,
46+
) {
4547
init {
4648
project.afterEvaluate {
4749
if (!version.isPresent) {
@@ -185,21 +187,21 @@ public open class JxBrowserExtension(private val project: Project) {
185187
return platformMap.entries.firstOrNull { it.key() }?.value
186188
?: project.providers.provider {
187189
val currentPlatform = "${osName()} ${jvmArch()}"
188-
val errorMessage = "The current $currentPlatform platform is not supported by JxBrowser ${version.get()}"
190+
val errorMessage =
191+
"The current $currentPlatform platform is not supported by JxBrowser ${version.get()}"
189192
throw IllegalStateException(errorMessage)
190193
}
191194
}
192195

193-
private fun artifact(shortName: String): Provider<String> {
194-
return version.map { versionValue ->
196+
private fun artifact(shortName: String): Provider<String> =
197+
version.map { versionValue ->
195198
checkArtifactSupported(shortName, versionValue)
196199
if (shortName == "core") {
197200
"$GROUP:jxbrowser:$versionValue"
198201
} else {
199202
"$GROUP:jxbrowser-$shortName:$versionValue"
200203
}
201204
}
202-
}
203205

204206
/**
205207
* Checks if the artifact with [shortName] exists in JxBrowser [version].

src/test/kotlin/com/teamdev/jxbrowser/gradle/JxBrowserPluginFunctionalTest.kt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ internal class JxBrowserPluginFunctionalTest {
7171
)
7272

7373
val result =
74-
GradleRunner.create()
74+
GradleRunner
75+
.create()
7576
.withProjectDir(testProjectDir)
7677
.withPluginClasspath()
7778
.withArguments("build")
@@ -132,7 +133,8 @@ internal class JxBrowserPluginFunctionalTest {
132133
)
133134

134135
val result =
135-
GradleRunner.create()
136+
GradleRunner
137+
.create()
136138
.withProjectDir(testProjectDir)
137139
.withPluginClasspath()
138140
.withArguments(taskName)
@@ -185,7 +187,8 @@ internal class JxBrowserPluginFunctionalTest {
185187
)
186188

187189
val result =
188-
GradleRunner.create()
190+
GradleRunner
191+
.create()
189192
.withProjectDir(testProjectDir)
190193
.withPluginClasspath()
191194
.withArguments(taskName)
@@ -220,7 +223,8 @@ internal class JxBrowserPluginFunctionalTest {
220223

221224
val failure =
222225
assertFails {
223-
GradleRunner.create()
226+
GradleRunner
227+
.create()
224228
.withProjectDir(testProjectDir)
225229
.withPluginClasspath()
226230
.withArguments("build")
@@ -247,7 +251,8 @@ internal class JxBrowserPluginFunctionalTest {
247251

248252
val failure =
249253
assertFails {
250-
GradleRunner.create()
254+
GradleRunner
255+
.create()
251256
.withProjectDir(testProjectDir)
252257
.withPluginClasspath()
253258
.withArguments("check")

0 commit comments

Comments
 (0)