tidy up gradle plugins (mostly removing comments)
This commit is contained in:
parent
aaca52a3e1
commit
531b8e193e
5 changed files with 3 additions and 56 deletions
|
|
@ -2,8 +2,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("kafkatorio.conventions.kotlin-dsl")
|
id("kafkatorio.conventions.kotlin-dsl")
|
||||||
// `kotlin-dsl`
|
|
||||||
// kotlin("jvm") version embeddedKotlinVersion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
@ -43,21 +41,3 @@ tasks.withType<KotlinCompile>().configureEach {
|
||||||
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
//val gradleJvmTarget = "11"
|
|
||||||
//
|
|
||||||
//kotlin {
|
|
||||||
// jvmToolchain {
|
|
||||||
// (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(gradleJvmTarget))
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//kotlinDslPluginOptions {
|
|
||||||
// jvmTarget.set(gradleJvmTarget)
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//tasks.withType<KotlinCompile>().configureEach {
|
|
||||||
// kotlinOptions {
|
|
||||||
// jvmTarget = gradleJvmTarget
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
|
||||||
|
|
@ -33,23 +33,6 @@ dependencies {
|
||||||
implementation(libs.ktorSerialization.kotlinxJson)
|
implementation(libs.ktorSerialization.kotlinxJson)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//val gradleJvmTarget = 11
|
|
||||||
//
|
|
||||||
//kotlin {
|
|
||||||
// jvmToolchain(gradleJvmTarget)
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//kotlinDslPluginOptions {
|
|
||||||
// jvmTarget.set("$gradleJvmTarget")
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//tasks.withType<KotlinCompile>().configureEach {
|
|
||||||
// kotlinOptions {
|
|
||||||
// jvmTarget = "$gradleJvmTarget"
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
plugins {
|
plugins {
|
||||||
create("factorioMod") {
|
create("factorioMod") {
|
||||||
|
|
@ -60,20 +43,7 @@ gradlePlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
overrideKotlinLanguageVersion("1.7") // required for Kotlinx Serialization
|
||||||
overrideKotlinLanguageVersion("1.7")
|
|
||||||
|
|
||||||
//val gradleKotlinTarget = "1.7"
|
|
||||||
//
|
|
||||||
//afterEvaluate {
|
|
||||||
// tasks.withType<KotlinCompile>().configureEach {
|
|
||||||
// kotlinOptions {
|
|
||||||
// apiVersion = gradleKotlinTarget
|
|
||||||
// languageVersion = gradleKotlinTarget
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
tasks.withType<KotlinCompile>().configureEach {
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
kotlinOptions.freeCompilerArgs += listOf(
|
kotlinOptions.freeCompilerArgs += listOf(
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,11 @@ abstract class FactorioModPlugin @Inject constructor(
|
||||||
override fun apply(target: Project) {
|
override fun apply(target: Project) {
|
||||||
target.createSettings()
|
target.createSettings()
|
||||||
|
|
||||||
|
|
||||||
val factorioModConfiguration =
|
val factorioModConfiguration =
|
||||||
target.configurations.register(FACTORIO_GRADLE_CONFIGURATION_NAME) {
|
target.configurations.register(FACTORIO_GRADLE_CONFIGURATION_NAME) {
|
||||||
asConsumer()
|
asConsumer()
|
||||||
factorioModAttributes(objects)
|
factorioModAttributes(objects)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Project.createSettings(): FactorioModSettings {
|
private fun Project.createSettings(): FactorioModSettings {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ plugins {
|
||||||
|
|
||||||
val gradleJvmTarget = "11"
|
val gradleJvmTarget = "11"
|
||||||
|
|
||||||
|
description = "Provide Gradle settings plugins, used to configure base Gradle behaviour"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// This project should only be providing simple plugins for configuring Gradle without
|
// This project should only be providing simple plugins for configuring Gradle without
|
||||||
// dependencies. Try to avoid setting dependencies here, else the Gradle script classpath might
|
// dependencies. Try to avoid setting dependencies here, else the Gradle script classpath might
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ kotlin {
|
||||||
"ws" to true,
|
"ws" to true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// static = mutableListOf("$buildDir/processedResources/frontend/main")
|
|
||||||
static = mutableListOf("$buildDir/processedResources/js/main")
|
static = mutableListOf("$buildDir/processedResources/js/main")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -139,7 +138,6 @@ val runWebMap by tasks.registering {
|
||||||
group = rootProject.name
|
group = rootProject.name
|
||||||
|
|
||||||
dependsOn(tasks.withName("browserDevelopmentRun"))
|
dependsOn(tasks.withName("browserDevelopmentRun"))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue