Anders Kielsholm
05/10/2022, 11:16 PMeygraber
05/10/2022, 11:50 PMiamsteveholmes
05/11/2022, 6:28 AMeygraber
05/11/2022, 7:01 AMPaul Woitaschek
05/11/2022, 8:42 AMMichael Paus
05/11/2022, 9:12 AMOrhan Tozan
05/11/2022, 9:40 AMeygraber
05/11/2022, 12:31 PMOrhan Tozan
05/11/2022, 12:32 PMPaul Woitaschek
05/11/2022, 12:32 PMOrhan Tozan
05/11/2022, 12:32 PMeygraber
05/11/2022, 1:51 PMMichael Paus
05/11/2022, 1:55 PMeygraber
05/11/2022, 2:18 PMAnders Kielsholm
05/11/2022, 6:09 PMkotlin.mpp.hierarchicalStructureSupport=false
(from the other thread) and think it is a good suggestion (with reference to https://kotlinlang.org/docs/multiplatform-hierarchy.html). It however didn't work, and when trying out some of the things suggested in that article I get lateinit property targets has not been initialized
while syncing (similar to what's described here: https://youtrack.jetbrains.com/issue/KT-48504)eygraber
05/11/2022, 6:14 PMkotlin.mpp.hierarchialStructureSupport=false
definitely helped with some of the issues (like common modules in my project not getting recognized as a source set), but didn't help at all with external dependencies.Anders Kielsholm
05/11/2022, 6:19 PMeygraber
05/11/2022, 7:48 PMMichael Paus
05/11/2022, 7:59 PMAnders Kielsholm
05/11/2022, 9:33 PMeygraber
05/12/2022, 5:04 PMPaul Woitaschek
05/12/2022, 5:06 PMJavier
05/12/2022, 5:25 PMeygraber
05/12/2022, 5:52 PMJavier
05/12/2022, 5:52 PMeygraber
05/12/2022, 5:53 PMSebastian Sellmair [JB]
05/13/2022, 8:56 AMAnders Kielsholm
05/13/2022, 9:00 AMJohn O'Reilly
05/13/2022, 9:01 AMPaul Woitaschek
05/13/2022, 9:02 AMJohn O'Reilly
05/13/2022, 9:04 AMPaul Woitaschek
05/13/2022, 9:04 AMSebastian Sellmair [JB]
05/13/2022, 9:09 AMPaul Woitaschek
05/13/2022, 9:10 AMJohn O'Reilly
05/13/2022, 9:10 AMSebastian Sellmair [JB]
05/13/2022, 9:11 AMJavier
05/13/2022, 9:11 AMJohn O'Reilly
05/13/2022, 9:13 AMJavier
05/13/2022, 9:13 AMPaul Woitaschek
05/13/2022, 9:15 AMSebastian Sellmair [JB]
05/13/2022, 9:27 AMPaul Woitaschek
05/13/2022, 9:29 AMSebastian Sellmair [JB]
05/13/2022, 9:29 AMJohn O'Reilly
05/13/2022, 9:30 AMSebastian Sellmair [JB]
05/13/2022, 9:37 AMJohn O'Reilly
05/13/2022, 9:54 AMiOSMain
code https://github.com/joreilly/FantasyPremierLeague (also happening in PeopleInSpace project as well...other screenshot here from that)Javier
05/13/2022, 9:57 AMPaul Woitaschek
05/13/2022, 9:59 AMeygraber
05/13/2022, 3:01 PMI know people will really dislike this and will attribute a very negative sentiment towards what I am saying nowI can't speak for anyone else, but I really appreciate you saying all of this, and I have no negative sentiment towards what you are saying whatsoever 😄 Considering some of the other partners in the ecosystem won't talk to us at all, this is great.
Which AGP feature is not present int 7.0 that you would sacrifice red code in the IDE for?It's not necessarily features (although it would be nice to use some of the newer ones), which typically come more from AS. For me, I'd like to use newer versions of AGP because some of the earlier 7.x versions had leaks or performance issues and didn't work that well with Gradle. It will also get more difficult to keep up with the ecosystem, as they tend to evolve in tandem (especially AGP and Gradle; they even synced their major version numbers). Some of the things not available in AGP 7.0.X include: • Cacheable lint • New publishing DSL • Fixes for Gradle configuration cache • R8 fixes • IDE integration fixes • Test fixtures I'd be happy to use Intellij for KMP as long as it allowed more recent versions of AGP.
You folks are already talking about electric eel, getting excited about stuff presented in IO and I understand that. But folks:
Multiplatform is still considered alpha.
Electric Eel is canary 1
What are your expectations?Expectations might be weird. Google has been training us to think that there's nothing wrong with using an alpha in production. In my main project, most of my androidx dependencies are either in alpha, beta, or rc. They're almost never on a stable version.
There were even issues which nobody had tools and CI to fix (this sounds crazy, but I could give a whole conference talk about what happened here and how we tried to get out)I'd pay 💰 to watch that talk
Paul Woitaschek
05/13/2022, 5:25 PMeygraber
05/13/2022, 5:28 PMPaul Woitaschek
05/13/2022, 5:28 PMeygraber
05/13/2022, 5:28 PMYeah I think square created a facade around that.
Interesting, I'll look around for it
Paul Woitaschek
05/13/2022, 5:29 PMeygraber
05/13/2022, 5:29 PMPaul Woitaschek
05/13/2022, 5:29 PMeygraber
05/13/2022, 5:32 PMPaul Woitaschek
05/13/2022, 5:34 PMMichael Paus
05/14/2022, 12:45 PMIntelliJ IDEA 2022.1.1 (Community Edition)
Build #IC-221.5591.52, built on May 10, 2022
Runtime version: 11.0.14.1+1-b2043.45 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Non-Bundled Plugins:
com.intellij.javafx (1.0.4)
org.asciidoctor.intellij.asciidoc (0.37.17)
com.gluonhq.plugin.intellij (2.8.6)
androidx.compose.plugins.idea (221.5591.19)
Kotlin: 221-1.6.21-release-337-IJ5591.52
Anders Kielsholm
05/16/2022, 6:37 AMSebastian Sellmair [JB]
05/16/2022, 8:26 AMeygraber
05/16/2022, 9:05 AMMichael Paus
05/16/2022, 9:33 AMSebastian Sellmair [JB]
05/16/2022, 9:35 AMMichael Paus
05/16/2022, 9:57 AMPaul Woitaschek
05/16/2022, 1:01 PMMichael Paus
05/16/2022, 2:19 PMJavier
05/16/2022, 2:22 PMMichael Paus
05/16/2022, 2:22 PMJavier
05/16/2022, 2:23 PMMichael Paus
05/16/2022, 2:33 PMJavier
05/16/2022, 2:55 PMMichael Paus
05/16/2022, 2:56 PMThe feature "multi platform projects" is experimental and should be enabled explicitly
Javier
05/16/2022, 2:57 PMMichael Paus
05/16/2022, 4:34 PMJavier
05/16/2022, 4:36 PMvanniktech
05/16/2022, 5:37 PMproject/.gradle
& project/.idea
directories & then re-sync everything. That should usually help.
• For now when doing Kotlin Multiplatform use IntelliJ. There are plans to make more things from the tooling side stable which the Android Team might leverage to have better support for KMP within AS.Sebastian Sellmair [JB]
05/17/2022, 7:57 AMcommonMain
is dead in the :shared
module.
With dead I mean, it is not recognised and imported by the IDE.
This can easily be seen in the Project window, by it being a plain folder (not marked as source folder)
Here is what is (most likely) going on breaking your IDE:
In the online meeting, I explained, that AS and IJ used to have different internal representations for source sets (basically they were imported differently).
IJ: Each Kotlin Source set <-> IJ module
AS: Each Gradle Project <-> IJ module
This is what this legacy importing mode
is also talking about.
Now the project in question here just has a single Target (android) defined. The Kotlin IDE plugin will detect that this is Android and that commonMain is effectively an Android source set as well (thats the intersection of all platforms). The plugin will expect Android being able to handle this source set and not run the import code. The expectation is that Android will also include this source set in its Project <-> IJ module representation.
Now AS changed its internal representation and the expectation of the Kotlin IDE plugin might not be correct anymore leading to a source set that is effectively not handled by anyone.
You can do an experiment: Just adding a jvm()
target will resurrect commonMain again.
I have seen this issue being discussed already internally. I will bring it up once again and ping necessary people.Anders Kielsholm
05/17/2022, 9:19 AMJavier
05/17/2022, 9:23 AMeygraber
05/17/2022, 9:27 AMkotlin.mpp.hierarchicalStructureSupport=false
set from when I was testing with Android Studio. As soon as I removed it, Intellij started working 🥳
Now I wanted to see if I could make progress with Android Studio. commonMain
source set is dead. So I put kotlin.mpp.hierarchicalStructureSupport=false
back and now it is not dead; it shows a blue square. But common dependencies are still not resolving.
So I remove kotlin.mpp.hierarchicalStructureSupport=false
and add the following to my module's `build.gradle.kts`:
kotlin.sourceSets.named("androidMain") {
kotlin.srcDir("src/commonMain/kotlin")
}
I did this because you mentioned that since IDE plugin is treating commonMain
as part of Android (because it's the only target) and because of model changes no one is handling commonMain
properly, I'd "help" it handle it.
And it works! External common dependencies are now resolving. However, project level common dependencies aren't resolving now. I'm going to play with it a little more, but it seems like this could be a viable workaround for now.Sebastian Sellmair [JB]
05/17/2022, 9:49 AMkmm-basic-sample
seems unaffected by updating to 7.2 and re-syncing.
@eygraber We will try to schedule a private call together, looking at your project.
I will try to sync with the AS team looking what the current state of the issue here isPaul Woitaschek
05/17/2022, 9:53 AMSebastian Sellmair [JB]
05/17/2022, 9:58 AMMarked as fixed.
This issue has been fixed in Android Studio Chipmunk Beta 3 / Dolphin Canary 3.
Anders Kielsholm
05/17/2022, 10:02 AMSebastian Sellmair [JB]
05/17/2022, 10:03 AMAnders Kielsholm
05/17/2022, 10:13 AMSebastian Sellmair [JB]
05/17/2022, 11:34 AMAnders Kielsholm
05/17/2022, 12:13 PMeygraber
05/17/2022, 11:53 PMOrhan Tozan
06/28/2022, 11:33 AMMarkRS
06/28/2022, 12:39 PMeygraber
06/28/2022, 12:41 PMJavier
06/28/2022, 12:42 PMMarkRS
06/28/2022, 12:45 PMeygraber
06/28/2022, 1:17 PMMarkRS
06/28/2022, 1:20 PMeygraber
06/28/2022, 1:23 PMJavier
06/28/2022, 1:28 PMeygraber
06/28/2022, 3:12 PMRacka N
07/03/2022, 2:53 PMexpect
declarations won't work in commonMain
or commonTest
. But if you manually add the import there won't be any red lines for unresolved references.
Tested this on AS Dolphin, Bumblebee, Chipmunk, Intellij 2021.3.1, 2022.2 EAP7. With Kotlin 1.7.0, AGP 7.2.1 and Gradle 7.4.2vanniktech
07/09/2022, 1:05 PMRacka N
07/09/2022, 1:36 PMPaul Woitaschek
07/09/2022, 3:54 PMRacka N
07/09/2022, 3:57 PMvanniktech
07/10/2022, 9:07 AMRacka N
07/10/2022, 12:04 PMexpect
declarations even if they are in the same module. Manually importing them does work though and there are no longer any red lines in the project with the cache disabled.
Though I haven't tried with cache enabled through terminal (I had it enforced in gradle.properties
) and I'm still on 1.7.0 which doesn't have the config cache fixesMarco Righini
07/25/2022, 7:50 AMRacka N
07/25/2022, 8:31 AMOrhan Tozan
07/25/2022, 10:40 AMJavier
07/25/2022, 10:41 AMMarco Righini
07/25/2022, 10:42 AMSebastian Sellmair [JB]
07/25/2022, 10:50 AMRacka N
07/25/2022, 10:51 AMJavier
07/25/2022, 10:52 AMWe did some changes to get the Android Plugin merged into IJ fasterThat is really great, good job 😄
Racka N
07/25/2022, 10:54 AMSebastian Sellmair [JB]
07/25/2022, 10:54 AMJavier
07/25/2022, 10:55 AMthat this will take time to get into stable releases of AS and IJ.What about EAPs? I usually work with the IntelliJ EAP even without this issue
Sebastian Sellmair [JB]
07/25/2022, 10:57 AMMarco Righini
07/25/2022, 11:04 AMSebastian Sellmair [JB]
07/25/2022, 11:07 AMMichael Paus
07/25/2022, 11:26 AMSebastian Sellmair [JB]
07/25/2022, 11:29 AMMichael Paus
07/25/2022, 11:48 AMSebastian Sellmair [JB]
07/25/2022, 11:50 AMMichael Paus
07/25/2022, 11:51 AMSebastian Sellmair [JB]
07/26/2022, 8:06 AMJohn O'Reilly
07/26/2022, 2:39 PMxxfast
11/22/2022, 11:34 PMJavier
11/22/2022, 11:52 PMeygraber
11/23/2022, 12:14 AM