add some IntelliJ exclusions
This commit is contained in:
parent
a518255027
commit
d5a55b423d
3 changed files with 29 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
import dev.adamko.kafkatorio.gradle.excludeGeneratedGradleDsl
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
idea
|
idea
|
||||||
base
|
base
|
||||||
|
|
@ -23,6 +25,12 @@ idea {
|
||||||
module {
|
module {
|
||||||
isDownloadSources = true
|
isDownloadSources = true
|
||||||
isDownloadJavadoc = true
|
isDownloadJavadoc = true
|
||||||
|
excludeGeneratedGradleDsl(layout)
|
||||||
|
excludeDirs = excludeDirs + layout.files(
|
||||||
|
".idea",
|
||||||
|
"gradle/kotlin-js-store",
|
||||||
|
"gradle/wrapper",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
|
|
||||||
rootProject.name = "buildSrc"
|
|
||||||
|
|
||||||
apply(from = "./repositories.settings.gradle.kts")
|
apply(from = "./repositories.settings.gradle.kts")
|
||||||
|
|
||||||
@Suppress("UnstableApiUsage") // Central declaration of repositories is an incubating feature
|
@Suppress("UnstableApiUsage") // Central declaration of repositories is an incubating feature
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,12 @@ import kotlinx.serialization.json.jsonObject
|
||||||
import kotlinx.serialization.json.jsonPrimitive
|
import kotlinx.serialization.json.jsonPrimitive
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.Task
|
import org.gradle.api.Task
|
||||||
|
import org.gradle.api.file.ProjectLayout
|
||||||
import org.gradle.api.file.RegularFileProperty
|
import org.gradle.api.file.RegularFileProperty
|
||||||
import org.gradle.api.provider.MapProperty
|
import org.gradle.api.provider.MapProperty
|
||||||
import org.gradle.api.specs.Spec
|
import org.gradle.api.specs.Spec
|
||||||
import org.gradle.kotlin.dsl.invoke
|
import org.gradle.kotlin.dsl.invoke
|
||||||
|
import org.gradle.plugins.ide.idea.model.IdeaModule
|
||||||
|
|
||||||
|
|
||||||
operator fun <T> Spec<T>.not(): Spec<T> = Spec<T> { !this(it) }
|
operator fun <T> Spec<T>.not(): Spec<T> = Spec<T> { !this(it) }
|
||||||
|
|
@ -50,3 +52,22 @@ fun Project.areJsonPropertiesUpToDate(
|
||||||
isUpToDate
|
isUpToDate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** exclude generated Gradle code, so it doesn't clog up search results */
|
||||||
|
fun IdeaModule.excludeGeneratedGradleDsl(layout: ProjectLayout) {
|
||||||
|
excludeDirs.addAll(
|
||||||
|
layout.files(
|
||||||
|
"buildSrc/build/generated-sources/kotlin-dsl-accessors",
|
||||||
|
"buildSrc/build/generated-sources/kotlin-dsl-accessors/kotlin",
|
||||||
|
"buildSrc/build/generated-sources/kotlin-dsl-accessors/kotlin/gradle",
|
||||||
|
"buildSrc/build/generated-sources/kotlin-dsl-external-plugin-spec-builders",
|
||||||
|
"buildSrc/build/generated-sources/kotlin-dsl-external-plugin-spec-builders/kotlin",
|
||||||
|
"buildSrc/build/generated-sources/kotlin-dsl-external-plugin-spec-builders/kotlin/gradle",
|
||||||
|
"buildSrc/build/generated-sources/kotlin-dsl-plugins",
|
||||||
|
"buildSrc/build/generated-sources/kotlin-dsl-plugins/kotlin",
|
||||||
|
"buildSrc/build/generated-sources/kotlin-dsl-plugins/kotlin/dev",
|
||||||
|
"buildSrc/build/pluginUnderTestMetadata",
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue