From c151746e535ada5b295c2a91ff7a59e913f419aa Mon Sep 17 00:00:00 2001 From: Sebastian Aigner Date: Wed, 4 Nov 2020 17:47:58 +0100 Subject: [PATCH] Add IDE resolution warning for examples sharing JVM & Android code. (#49) Co-authored-by: Sebastian Aigner --- .../example/imageviewer/model/ImageRepository.kt | 15 +++++++++++++++ .../example/imageviewer/model/Miniatures.kt | 14 ++++++++++++++ .../kotlin/example/imageviewer/utils/Network.kt | 14 ++++++++++++++ .../examples/jetissues/data/IssuesRepository.kt | 15 +++++++++++++++ .../ui/examples/jetissues/view/JetIssuesView.kt | 14 ++++++++++++++ 5 files changed, 72 insertions(+) diff --git a/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/model/ImageRepository.kt b/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/model/ImageRepository.kt index 1e4f917647..dddcc59159 100755 --- a/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/model/ImageRepository.kt +++ b/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/model/ImageRepository.kt @@ -1,3 +1,18 @@ +// READ ME FIRST! +// +// Code in this file is shared between the Android and Desktop JVM targets. +// Kotlin's hierarchical multiplatform projects currently +// don't support sharing code depending on JVM declarations. +// +// You can follow the progress for HMPP JVM & Android intermediate source sets here: +// https://youtrack.jetbrains.com/issue/KT-42466 +// +// The workaround used here to access JVM libraries causes IntelliJ IDEA to not +// resolve symbols in this file properly. +// +// Resolution errors in your IDE do not indicate a problem with your setup. + + package example.imageviewer.model import example.imageviewer.core.Repository diff --git a/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/model/Miniatures.kt b/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/model/Miniatures.kt index 52597e1b77..f1bb7e2ac2 100755 --- a/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/model/Miniatures.kt +++ b/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/model/Miniatures.kt @@ -1,3 +1,17 @@ +// READ ME FIRST! +// +// Code in this file is shared between the Android and Desktop JVM targets. +// Kotlin's hierarchical multiplatform projects currently +// don't support sharing code depending on JVM declarations. +// +// You can follow the progress for HMPP JVM & Android intermediate source sets here: +// https://youtrack.jetbrains.com/issue/KT-42466 +// +// The workaround used here to access JVM libraries causes IntelliJ IDEA to not +// resolve symbols in this file properly. +// +// Resolution errors in your IDE do not indicate a problem with your setup. + package example.imageviewer.model diff --git a/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/utils/Network.kt b/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/utils/Network.kt index b3da6a41a8..d477814b3a 100755 --- a/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/utils/Network.kt +++ b/examples/imageviewer/common/src/commonMain/kotlin/example/imageviewer/utils/Network.kt @@ -1,3 +1,17 @@ +// READ ME FIRST! +// +// Code in this file is shared between the Android and Desktop JVM targets. +// Kotlin's hierarchical multiplatform projects currently +// don't support sharing code depending on JVM declarations. +// +// You can follow the progress for HMPP JVM & Android intermediate source sets here: +// https://youtrack.jetbrains.com/issue/KT-42466 +// +// The workaround used here to access JVM libraries causes IntelliJ IDEA to not +// resolve symbols in this file properly. +// +// Resolution errors in your IDE do not indicate a problem with your setup. + package example.imageviewer.utils import java.net.InetAddress diff --git a/examples/issues/common/src/commonMain/kotlin/androidx/ui/examples/jetissues/data/IssuesRepository.kt b/examples/issues/common/src/commonMain/kotlin/androidx/ui/examples/jetissues/data/IssuesRepository.kt index b1085d3b86..9532649ee9 100644 --- a/examples/issues/common/src/commonMain/kotlin/androidx/ui/examples/jetissues/data/IssuesRepository.kt +++ b/examples/issues/common/src/commonMain/kotlin/androidx/ui/examples/jetissues/data/IssuesRepository.kt @@ -1,3 +1,18 @@ +// READ ME FIRST! +// +// Code in this file is shared between the Android and Desktop JVM targets. +// Kotlin's hierarchical multiplatform projects currently +// don't support sharing code depending on JVM declarations. +// +// You can follow the progress for HMPP JVM & Android intermediate source sets here: +// https://youtrack.jetbrains.com/issue/KT-42466 +// +// The workaround used here to access JVM libraries causes IntelliJ IDEA to not +// resolve symbols in this file properly. +// +// Resolution errors in your IDE do not indicate a problem with your setup. + + package androidx.ui.examples.jetissues.data import androidx.ui.examples.jetissues.query.IssueQuery diff --git a/examples/issues/common/src/commonMain/kotlin/androidx/ui/examples/jetissues/view/JetIssuesView.kt b/examples/issues/common/src/commonMain/kotlin/androidx/ui/examples/jetissues/view/JetIssuesView.kt index a8f0d99875..5c7ef9dd7f 100644 --- a/examples/issues/common/src/commonMain/kotlin/androidx/ui/examples/jetissues/view/JetIssuesView.kt +++ b/examples/issues/common/src/commonMain/kotlin/androidx/ui/examples/jetissues/view/JetIssuesView.kt @@ -1,3 +1,17 @@ +// READ ME FIRST! +// +// Code in this file is shared between the Android and Desktop JVM targets. +// Kotlin's hierarchical multiplatform projects currently +// don't support sharing code depending on JVM declarations. +// +// You can follow the progress for HMPP JVM & Android intermediate source sets here: +// https://youtrack.jetbrains.com/issue/KT-42466 +// +// The workaround used here to access JVM libraries causes IntelliJ IDEA to not +// resolve symbols in this file properly. +// +// Resolution errors in your IDE do not indicate a problem with your setup. + package androidx.ui.examples.jetissues.view import androidx.compose.foundation.Box