-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issues preventing
buildSrc
from running correctly and resolve…
…d plugin version conflicts
- Loading branch information
Showing
7 changed files
with
126 additions
and
109 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1 @@ | ||
plugins { | ||
val kotlinVersion = "2.0.0" | ||
kotlin("multiplatform") | ||
kotlin("plugin.serialization") version kotlinVersion | ||
application | ||
`maven-publish` | ||
} | ||
|
||
group = "tools.aqua" | ||
version = "1.0-SNAPSHOT" | ||
|
||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(11) | ||
jvm { | ||
withJava() | ||
testRuns["test"].executionTask.configure { | ||
useJUnitPlatform() | ||
} | ||
} | ||
js(IR) { | ||
binaries.executable() | ||
browser { | ||
commonWebpackConfig { | ||
cssSupport { | ||
enabled.set(true) | ||
} | ||
} | ||
} | ||
} | ||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.0") | ||
} | ||
} | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(kotlin("test")) | ||
} | ||
} | ||
val jvmMain by getting { | ||
dependencies { | ||
implementation("io.ktor:ktor-server-core:2.3.11") | ||
implementation("io.ktor:ktor-server-netty:2.3.11") | ||
implementation("io.ktor:ktor-server-websockets:2.3.11") | ||
implementation("io.ktor:ktor-server-html-builder-jvm:2.3.11") | ||
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2") | ||
implementation("me.friwi:jcefmaven:122.1.10") | ||
} | ||
} | ||
val jvmTest by getting | ||
val jsMain by getting { | ||
dependencies { | ||
implementation("org.jetbrains.kotlin-wrappers:kotlin-react:18.3.1-pre.758") | ||
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:18.3.1-pre.758") | ||
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion:11.11.4-pre.758") | ||
} | ||
} | ||
val jsTest by getting | ||
} | ||
} | ||
|
||
application { | ||
mainClass.set("tools.aqua.bgw.main.MainKt") | ||
} | ||
|
||
tasks.named<Copy>("jvmProcessResources") { | ||
val jsBrowserDistribution = tasks.named("jsBrowserDistribution") | ||
from(jsBrowserDistribution) | ||
} | ||
|
||
tasks.named<JavaExec>("run") { | ||
dependsOn(tasks.named<Jar>("jvmJar")) | ||
classpath(tasks.named<Jar>("jvmJar")) | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
groupId = "tools.aqua" | ||
artifactId = "bgw-gui" | ||
version = "1.0-SNAPSHOT" | ||
from(components["kotlin"]) | ||
} | ||
} | ||
} | ||
plugins { id("tools.aqua.bgw.multiplatform-conventions") } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
100 changes: 100 additions & 0 deletions
100
buildSrc/src/main/kotlin/tools.aqua.bgw.multiplatform-conventions.gradle.kts
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 |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
* Copyright 2024 The BoardGameWork Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import org.gradle.api.publish.maven.MavenPublication | ||
import org.gradle.api.tasks.Copy | ||
import org.gradle.api.tasks.JavaExec | ||
import org.gradle.api.tasks.bundling.Jar | ||
import org.gradle.kotlin.dsl.* | ||
|
||
plugins { | ||
kotlin("multiplatform") | ||
kotlin("plugin.serialization") | ||
application | ||
`maven-publish` | ||
id("io.gitlab.arturbosch.detekt") | ||
} | ||
|
||
group = "tools.aqua" | ||
|
||
version = "1.0-SNAPSHOT" | ||
|
||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(11) | ||
jvm { | ||
withJava() | ||
testRuns["test"].executionTask.configure { useJUnitPlatform() } | ||
} | ||
js(IR) { | ||
binaries.executable() | ||
browser { commonWebpackConfig { cssSupport { enabled.set(true) } } } | ||
} | ||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.0") } | ||
} | ||
val commonTest by getting { dependencies { implementation(kotlin("test")) } } | ||
val jvmMain by getting { | ||
dependencies { | ||
implementation("io.ktor:ktor-server-core:2.3.11") | ||
implementation("io.ktor:ktor-server-netty:2.3.11") | ||
implementation("io.ktor:ktor-server-websockets:2.3.11") | ||
implementation("io.ktor:ktor-server-html-builder-jvm:2.3.11") | ||
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2") | ||
implementation("me.friwi:jcefmaven:122.1.10") | ||
} | ||
} | ||
val jvmTest by getting | ||
val jsMain by getting { | ||
dependencies { | ||
implementation("org.jetbrains.kotlin-wrappers:kotlin-react:18.3.1-pre.758") | ||
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:18.3.1-pre.758") | ||
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion:11.11.4-pre.758") | ||
} | ||
} | ||
val jsTest by getting | ||
} | ||
} | ||
|
||
application { mainClass.set("tools.aqua.bgw.main.MainKt") } | ||
|
||
tasks.named<Copy>("jvmProcessResources") { | ||
val jsBrowserDistribution = tasks.named("jsBrowserDistribution") | ||
from(jsBrowserDistribution) | ||
} | ||
|
||
tasks.named<JavaExec>("run") { | ||
dependsOn(tasks.named<Jar>("jvmJar")) | ||
classpath(tasks.named<Jar>("jvmJar")) | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
groupId = "tools.aqua" | ||
artifactId = "bgw-gui" | ||
version = "1.0-SNAPSHOT" | ||
from(components["kotlin"]) | ||
} | ||
} | ||
} |
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
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
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