File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 55 */
66plugins {
77 kotlin(" jvm" )
8- ` maven`
8+ maven
99 `maven- publish`
1010 id(" org.jetbrains.dokka" )
1111}
@@ -43,6 +43,18 @@ subprojects {
4343 }
4444 }
4545
46+
47+ // this is the default but it's better to be explicit (e.g. it may change in Kotlin 1.5)
48+ tasks.compileKotlin {
49+ kotlinOptions.jvmTarget = " 1.6"
50+ }
51+ tasks.compileTestKotlin {
52+ kotlinOptions.jvmTarget = " 1.6"
53+ }
54+
55+ // FIXME - we can remove this when we implement generated services as multiplatform.
56+ setOutgoingVariantMetadata()
57+
4658 val sourcesJar by tasks.creating(Jar ::class ) {
4759 group = " publishing"
4860 description = " Assembles Kotlin sources jar"
@@ -65,3 +77,13 @@ subprojects {
6577
6678 apply (from = rootProject.file(" gradle/publish.gradle" ))
6779}
80+
81+
82+ // fixes outgoing variant metadata: https://github.com/awslabs/smithy-kotlin/issues/258
83+ fun Project.setOutgoingVariantMetadata () {
84+ tasks.withType<JavaCompile >() {
85+ val javaVersion = JavaVersion .VERSION_1_8 .toString()
86+ sourceCompatibility = javaVersion
87+ targetCompatibility = javaVersion
88+ }
89+ }
You can’t perform that action at this time.
0 commit comments