gaetan
10/23/2019, 2:29 PMtask app1(type: KtolinJsDce) {
dceOptions {
outputFileName = "app1"
keep = "mod.app1.start"
}
}
Ilya Goncharov [JB]
10/23/2019, 3:07 PMKotlinJsDce
task is Compile in terms of Gradle
You need to define some properties for that
- source
- classpath
- destinationDir
Basically, you can find source in your compileTask
Classpath can be classpath of compileTask
And destinationDir
is basically destination dir of your dce’d javascript files (seems that you can not to set dceOptions.outputDirectory
Finally, you get something like this
val app1 by tasks.registering(KotlinJsDce::class) {
val task = tasks.getByName("compileKotlinJs") as Kotlin2JsCompile
source(task.outputFile)
classpath = task.classpath
destinationDir = File("$buildDir/app2")
dceOptions {
keep += "test-app.org.my.foo"
}
}
Could you please provide some information about your use case? Maybe we can make it more convenient in futuregaetan
10/23/2019, 4:03 PMgaetan
10/23/2019, 4:06 PMIlya Goncharov [JB]
10/23/2019, 4:07 PMkeep
declarations because you generate multiple files with different public JavaScript API, that you return in different cases, am I right?gaetan
10/23/2019, 4:08 PMgaetan
10/23/2019, 4:10 PMFudge
10/23/2019, 8:49 PMgaetan
10/23/2019, 9:52 PMgaetan
10/24/2019, 6:41 AMIlya Goncharov [JB]
10/24/2019, 7:06 AMgaetan
10/24/2019, 7:07 AMgaetan
10/24/2019, 8:11 AMgaetan
10/24/2019, 8:20 AMFudge
10/24/2019, 8:41 AMgaetan
10/25/2019, 11:19 AM