josephivie
02/05/2019, 4:47 PMaltavir
02/05/2019, 5:17 PMjosephivie
02/05/2019, 5:18 PMaltavir
02/05/2019, 5:21 PMjosephivie
02/05/2019, 5:22 PMaltavir
02/05/2019, 5:22 PMjosephivie
02/05/2019, 5:23 PMaltavir
02/05/2019, 5:24 PMjosephivie
02/05/2019, 5:25 PMLamberto Basti
02/05/2019, 5:26 PMjosephivie
02/05/2019, 5:26 PMViewFactory
to get a sense of how it works. For simplicity of API, all interactions with views are done strictly at creation time and afterwards through observable properties.altavir
02/05/2019, 5:29 PMjosephivie
02/05/2019, 5:30 PMLamberto Basti
02/05/2019, 5:37 PMjosephivie
02/05/2019, 5:41 PMLamberto Basti
02/05/2019, 5:44 PMjosephivie
02/05/2019, 6:05 PMkotlin {
this.setup(project, KDependency.SourceSet("common",
KDependencySet.standardLibrary,
KDependencySet.testing,
KDependencySet.testingAnnotations,
KDependencySet.sourceSets("actuals",
KTargetSet.nonNative.sourceSet(
KDependencySet.sourceSets("nonNativeActuals",
KTarget.js.sourceSet(),
KTargetSet.jvmCommon.sourceSet()
)
),
KTargetSet.native.sourceSet()
)
))
}
Which can be read as:
I have a source set called common
which requires that the underlying platform have the standard library, testing library, and testing annotations. It also depends on some actuals being present in the library, which are split up into native
for all native targets, and nonNative
which has some implementations, but also needs js
and jvmCommon
to have all of the actuals.mingwx64
, for example, then it is not targeted.Lamberto Basti
02/05/2019, 6:16 PMjosephivie
02/05/2019, 6:21 PMLamberto Basti
02/05/2019, 6:25 PMjosephivie
02/05/2019, 6:25 PMLamberto Basti
02/05/2019, 6:26 PMjosephivie
02/05/2019, 6:27 PMLamberto Basti
02/05/2019, 6:27 PMpowerPc()
ad the beginning of the script and the configure blocks will handle it.josephivie
02/05/2019, 6:28 PMLamberto Basti
02/05/2019, 6:30 PMjosephivie
02/05/2019, 6:31 PMLamberto Basti
02/05/2019, 6:31 PMjosephivie
02/05/2019, 6:31 PMLamberto Basti
02/05/2019, 6:31 PMjosephivie
02/05/2019, 7:05 PMapi 'some:path-platform:version'
for every single platform. It got really tedious. Also, sometimes things like KotlinX serialization wouldn't have implementations for some platforms, and so if I declared all the platforms, I'd end up with errors. That's the idea behind what I'm doing. I'm trying to make it look like this:
setup(project) {
requiresStandardLibrary()
requiresTesting()
requiresTestingAnnotations()
//pulls in group:artifact-platform:version for each platform
requiresMaven("group", "artifact", "version") {
//You can override individual targets like this
override(Targets.native, "group-artifact-native-special", "version")
//If there is no dependency for a particular target, you can use this:
notAvailable(Targets.androidNativeX64)
//This will remove the given target from your list of publishing targets, but will allow you to use the others.
}
sourceSets {
Targets.native.sourceSet {
requiresMaven("group", "artifact-for-native", "version")
}
Targets.jvmCommon.sourceSet {
}
Targets.js.sourceSet {
requiresMaven("group", "artifact-for-js", "version")
}
}
}
Lamberto Basti
02/05/2019, 7:29 PMjosephivie
02/05/2019, 7:32 PMLamberto Basti
02/05/2019, 7:36 PMRobert
02/05/2019, 8:46 PMjosephivie
02/05/2019, 8:55 PMRobert
02/05/2019, 9:23 PM