tidy up gradle plugins (mostly removing comments)

This commit is contained in:
Adam 2022-10-30 17:13:03 +01:00
parent aaca52a3e1
commit 531b8e193e
5 changed files with 3 additions and 56 deletions

View file

@ -2,8 +2,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("kafkatorio.conventions.kotlin-dsl")
// `kotlin-dsl`
// kotlin("jvm") version embeddedKotlinVersion
}
dependencies {
@ -43,21 +41,3 @@ tasks.withType<KotlinCompile>().configureEach {
"-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
// }
//}

View file

@ -33,23 +33,6 @@ dependencies {
implementation(libs.ktorSerialization.kotlinxJson)
}
//val gradleJvmTarget = 11
//
//kotlin {
// jvmToolchain(gradleJvmTarget)
//}
//
//kotlinDslPluginOptions {
// jvmTarget.set("$gradleJvmTarget")
//}
//
//tasks.withType<KotlinCompile>().configureEach {
// kotlinOptions {
// jvmTarget = "$gradleJvmTarget"
// }
//}
gradlePlugin {
plugins {
create("factorioMod") {
@ -60,20 +43,7 @@ gradlePlugin {
}
}
overrideKotlinLanguageVersion("1.7")
//val gradleKotlinTarget = "1.7"
//
//afterEvaluate {
// tasks.withType<KotlinCompile>().configureEach {
// kotlinOptions {
// apiVersion = gradleKotlinTarget
// languageVersion = gradleKotlinTarget
// }
// }
//}
overrideKotlinLanguageVersion("1.7") // required for Kotlinx Serialization
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += listOf(

View file

@ -14,14 +14,11 @@ abstract class FactorioModPlugin @Inject constructor(
override fun apply(target: Project) {
target.createSettings()
val factorioModConfiguration =
target.configurations.register(FACTORIO_GRADLE_CONFIGURATION_NAME) {
asConsumer()
factorioModAttributes(objects)
}
}
private fun Project.createSettings(): FactorioModSettings {

View file

@ -8,6 +8,8 @@ plugins {
val gradleJvmTarget = "11"
description = "Provide Gradle settings plugins, used to configure base Gradle behaviour"
dependencies {
// 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

View file

@ -38,7 +38,6 @@ kotlin {
"ws" to true,
),
),
// static = mutableListOf("$buildDir/processedResources/frontend/main")
static = mutableListOf("$buildDir/processedResources/js/main")
)
}
@ -139,7 +138,6 @@ val runWebMap by tasks.registering {
group = rootProject.name
dependsOn(tasks.withName("browserDevelopmentRun"))
}