Skip to content

Commit

Permalink
Fix missing deployment for lib-coroutines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregory Lureau committed Feb 16, 2022
1 parent 806b3da commit 1ae666a
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
**/build
samples/node_modules/
local.properties
kotlin-js-store
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("deezer.kustomexport:lib:0.1.0")
implementation("deezer.kustomexport:lib:<version>")
implementation("deezer.kustomexport:lib-coroutines:<version>")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ tasks.create<Delete>("cleanMavenLocalArtifacts") {

tasks.create<Sync>("copyMavenLocalArtifacts") {
group = "publishing"
dependsOn(":compiler:publishToMavenLocal", ":lib:publishToMavenLocal")
dependsOn(":compiler:publishToMavenLocal", ":lib:publishToMavenLocal", ":lib-coroutines:publishToMavenLocal")

val userHome = System.getProperty("user.home")
val groupDir = project.group.toString().replace('.', '/')
Expand Down
2 changes: 1 addition & 1 deletion compiler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {
implementation("com.google.devtools.ksp:symbol-processing:$kspVersion")
implementation("com.google.devtools.ksp:symbol-processing-api:$kspVersion")

testImplementation("com.github.tschuchortdev:kotlin-compile-testing-ksp:1.4.6")
testImplementation("com.github.tschuchortdev:kotlin-compile-testing-ksp:1.4.7")
testImplementation("junit:junit:4.13.2")
testImplementation(kotlin("test"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ExportClassTest {
assertCompilationOutput(
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
class BasicClass
Expand Down Expand Up @@ -69,7 +69,7 @@ class ExportClassTest {
assertCompilationOutput(
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
class BasicClass(val id: String)
Expand All @@ -79,8 +79,8 @@ class ExportClassTest {
content = """
package foo.bar.js
import deezer.kustom.dynamicCastTo
import deezer.kustom.dynamicNull
import deezer.kustomexport.dynamicCastTo
import deezer.kustomexport.dynamicNull
import kotlin.String
import kotlin.Suppress
import kotlin.js.JsExport
Expand Down Expand Up @@ -137,7 +137,7 @@ class ExportClassTest {
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
import kotlin.Any
@KustomExport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ExportEnumTest {
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
enum class Season {
Expand All @@ -51,9 +51,9 @@ class ExportEnumTest {
@JsExport
public class Season internal constructor(
internal val `value`: CommonSeason
internal val common: CommonSeason
) {
public val name: String = value.name
public val name: String = common.name
}
@JsExport
Expand All @@ -77,21 +77,21 @@ class ExportEnumTest {
return null
}
public fun Season.importSeason(): CommonSeason = value
public fun Season.importSeason(): CommonSeason = common
public fun CommonSeason.exportSeason(): Season = Season(this)
public fun CommonSeason.exportSeason(): Season = Season_valueOf(this.name)!!
@JsExport
public val Season_SPRING: Season = CommonSeason.SPRING.exportSeason()
public val Season_SPRING: Season = Season(CommonSeason.SPRING)
@JsExport
public val Season_SUMMER: Season = CommonSeason.SUMMER.exportSeason()
public val Season_SUMMER: Season = Season(CommonSeason.SUMMER)
@JsExport
public val Season_AUTUMN: Season = CommonSeason.AUTUMN.exportSeason()
public val Season_AUTUMN: Season = Season(CommonSeason.AUTUMN)
@JsExport
public val Season_WINTER: Season = CommonSeason.WINTER.exportSeason()
public val Season_WINTER: Season = Season(CommonSeason.WINTER)
""".trimIndent()
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ExportInterfaceTest {
"""
package flux
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
interface Exportable
Expand Down Expand Up @@ -69,7 +69,7 @@ class ExportInterfaceTest {
"""
package flux
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
interface BasicInterface {
Expand Down Expand Up @@ -120,7 +120,7 @@ class ExportInterfaceTest {
"""
package flux
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
interface BasicInterface {
Expand Down Expand Up @@ -177,7 +177,7 @@ class ExportInterfaceTest {
"""
package flux
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
interface BasicInterface {
Expand Down Expand Up @@ -249,7 +249,7 @@ class ExportInterfaceTest {
content = """
package flux
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
import bar.Bar
@KustomExport
Expand Down Expand Up @@ -327,7 +327,7 @@ class ExportInterfaceTest {
content = """
package flux
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
import bar.Bar
@KustomExport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ExportSealedClassTest {
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
sealed class SealedParent(val ctorParam: Long) {
Expand Down Expand Up @@ -119,8 +119,8 @@ class ExportSealedClassTest {
content = """
package foo.bar.js
import deezer.kustom.dynamicCastTo
import deezer.kustom.dynamicNull
import deezer.kustomexport.dynamicCastTo
import deezer.kustomexport.dynamicNull
import kotlin.Double
import kotlin.String
import kotlin.Suppress
Expand Down Expand Up @@ -184,7 +184,7 @@ class ExportSealedClassTest {
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
import java.lang.IllegalStateException // Or else it's interpreted as a typealias and fail in the toClassName() koktlinpoet ext
@KustomExport
Expand Down Expand Up @@ -246,8 +246,8 @@ class ExportSealedClassTest {
content = """
package foo.bar.js
import deezer.kustom.dynamicCastTo
import deezer.kustom.dynamicNull
import deezer.kustomexport.dynamicCastTo
import deezer.kustomexport.dynamicNull
import kotlin.Double
import kotlin.String
import kotlin.Suppress
Expand Down Expand Up @@ -327,8 +327,8 @@ class ExportSealedClassTest {
content = """
package foo.bar.js
import deezer.kustom.dynamicCastTo
import deezer.kustom.dynamicNull
import deezer.kustomexport.dynamicCastTo
import deezer.kustomexport.dynamicNull
import kotlin.Double
import kotlin.String
import kotlin.Suppress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class GenericsInterfaceTest {
assertCompilationOutput(
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
open class GenericsBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TypeMappingTest {
assertCompilationOutput(
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
class AllTypesHandledByKotlinJs {
Expand Down Expand Up @@ -192,7 +192,7 @@ class TypeMappingTest {
assertCompilationOutput(
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
class MyLongClass {
Expand Down Expand Up @@ -252,7 +252,7 @@ class TypeMappingTest {
assertCompilationOutput(
"""
package foo.bar
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
class Nullables {
Expand Down Expand Up @@ -336,7 +336,7 @@ class TypeMappingTest {
package foo.bar
import pokemon.Pikachu
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
@KustomExport
class Arrays {
Expand Down Expand Up @@ -428,7 +428,7 @@ class TypeMappingTest {
"""
package pokedex
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
import pokemon.Pikachu
@KustomExport
Expand Down Expand Up @@ -503,7 +503,7 @@ class TypeMappingTest {
"Lambdas.kt",
"""
package foo
import deezer.kustom.KustomExport
import deezer.kustomexport.KustomExport
import pokemon.Pikachu
@KustomExport
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false

kotlinVersion=1.6.0
kspVersion=1.6.0-1.0.2
kotlinVersion=1.6.10
kspVersion=1.6.10-1.0.2
18 changes: 18 additions & 0 deletions lib-coroutines/src/commonMain/kotlin/Placeholder.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright 2022 Deezer.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Required to generate natives build and be able to use lib-coroutines on a KMP project...
private val placeholder_lib_coroutines = null

0 comments on commit 1ae666a

Please sign in to comment.