aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'buildSrc/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts')
-rw-r--r--buildSrc/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts22
1 files changed, 22 insertions, 0 deletions
diff --git a/buildSrc/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts b/buildSrc/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts
new file mode 100644
index 00000000..3addac74
--- /dev/null
+++ b/buildSrc/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts
@@ -0,0 +1,22 @@
+package org.jetbrains.conventions
+
+/**
+ * Base configuration for Java projects.
+ *
+ * This convention plugin contains shared Java config for both the [KotlinJvmPlugin] convention plugin and
+ * the Gradle Plugin subproject (which cannot have the `kotlin("jvm")` plugin applied).
+ */
+
+plugins {
+ `java`
+}
+
+java {
+ toolchain {
+ languageVersion.set(JavaLanguageVersion.of(8))
+ }
+}
+
+java {
+ withSourcesJar()
+}