PHondogo
10/30/2023, 10:22 AMmbonnin
10/30/2023, 1:01 PMmbonnin
10/30/2023, 1:03 PMmbonnin
10/30/2023, 1:10 PMmbonnin
10/30/2023, 1:11 PMexpect
/ actual
was convenient and I have yet to find an equivalentPHondogo
10/30/2023, 1:13 PMJavier
10/30/2023, 1:14 PMand I have yet to find an equivalentIs it even possible? 👀
mbonnin
10/30/2023, 1:14 PMJavier
10/30/2023, 1:15 PMJavier
10/30/2023, 1:16 PMmbonnin
10/30/2023, 1:16 PMJavier
10/30/2023, 1:16 PMmbonnin
10/30/2023, 1:17 PMmbonnin
10/30/2023, 1:17 PMJavier
10/30/2023, 1:17 PMYea but without IDE support, right?That is more related to Android Studio plugin
mbonnin
10/30/2023, 1:18 PMJavier
10/30/2023, 1:18 PMmbonnin
10/30/2023, 1:18 PMexpect
/`actual` is the best way to make it work all variants at the same timembonnin
10/30/2023, 1:19 PMJavier
10/30/2023, 1:19 PMexpect
one, as it is missing on Android variants, it can be hard to reason about what you are doing on main
without checking the debug/release (or whatever) source setsmbonnin
10/30/2023, 1:20 PMexpect
/`actual` paves the way for commonMain
artifacts, if we can ever have such a thingJavier
10/30/2023, 1:21 PMmbonnin
10/30/2023, 1:22 PMJavier
10/30/2023, 1:23 PMmbonnin
10/30/2023, 1:24 PMJavier
10/30/2023, 1:26 PMmbonnin
10/30/2023, 1:27 PMJavier
10/30/2023, 1:28 PMmbonnin
10/30/2023, 1:30 PMcommonTests
that have expect fun HttpEngine(): HttpEngine
. I can't really model that with Gradle variantsmbonnin
10/30/2023, 1:31 PMengine-ktor.jar
and engine-okhttp.jar
Javier
10/30/2023, 1:31 PMmbonnin
10/30/2023, 1:33 PMOr I guess I could produceThat "could" work. But then I need 2 different KGP compilations: "okhttpTest" and "ktorTest". Both of them having their ownandengine-ktor.jar
engine-okhttp.jar
SourceSet
("okHttpTest" and "ktorTest")Javier
10/30/2023, 1:34 PMJavier
10/30/2023, 1:34 PMmbonnin
10/30/2023, 1:35 PMsrcDir()
) a common jvmCommon
directory into both okHttpTest
and ktorTest
(breaks IDE. When I'm in "jvmCommon"
, how do I know what ``HttpEngine`` I'm using)Javier
10/30/2023, 1:36 PMSaid differently, this allows you to declare the dependencies specific to a feature in their own dependency scope, but everything is still compiled as a single source set. There will also be a single artifact (the component Jar) including support for all features.Looks like variants are merged into one jar
Javier
10/30/2023, 1:37 PMmbonnin
10/30/2023, 1:37 PMmbonnin
10/30/2023, 1:37 PMJavier
10/30/2023, 1:37 PMJavier
10/30/2023, 1:37 PMJavier
10/30/2023, 1:38 PMsourceSets {
create("mongodbSupport") {
java {
srcDir("src/mongodb/java")
}
}
}
java {
registerFeature("mongodbSupport") {
usingSourceSet(sourceSets["mongodbSupport"])
}
}
mbonnin
10/30/2023, 1:38 PMmbonnin
10/30/2023, 1:39 PMmbonnin
10/30/2023, 1:40 PMexpect
/`actual` functionality I guess?Javier
10/30/2023, 1:40 PMUnless the .jar could have some "information" about the different variants of a symbol and where they're located (edited)Yeah...
Maybe Gradle, Android and JetBrains could agree
Javier
10/30/2023, 1:40 PMJavier
10/30/2023, 1:41 PMmbonnin
10/30/2023, 1:41 PMmbonnin
10/30/2023, 1:41 PMJavier
10/30/2023, 1:41 PMJavier
10/30/2023, 1:42 PMmbonnin
10/30/2023, 1:47 PMexpect
/`actual` , you can split your project in several projects (:common
, :server
, :client
). If you're using convention plugins it shouldn't complicate your build a lot more. If you don't then there'll be an initial cost but this will make your build more maintainable if it grows bigger.mbonnin
10/30/2023, 1:47 PMPHondogo
10/30/2023, 2:36 PM