Add Gradle task to build cross-target platform libs (#927)
This commit is contained in:
+4
-1
@@ -270,13 +270,15 @@ targetList.each { target ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Task platformLibs = task("${target}PlatformLibs") {}
|
||||||
|
|
||||||
targetDefFiles(target).forEach{
|
targetDefFiles(target).forEach{
|
||||||
defFile ->
|
defFile ->
|
||||||
def taskName = defFileToTaskName(target, defFile.name)
|
def taskName = defFileToTaskName(target, defFile.name)
|
||||||
def suffix = null
|
def suffix = null
|
||||||
if (new PlatformInfo().isWindows())
|
if (new PlatformInfo().isWindows())
|
||||||
suffix = 'bat'
|
suffix = 'bat'
|
||||||
task(taskName, type:GradleBuild) {
|
Task libTask = task(taskName, type:GradleBuild) {
|
||||||
dependsOn ':dist'
|
dependsOn ':dist'
|
||||||
dependsOn ':tools:kotlin-native-gradle-plugin:jar'
|
dependsOn ':tools:kotlin-native-gradle-plugin:jar'
|
||||||
dependsOn defFile.config.depends.collect{defFileToTaskName(target, it)}
|
dependsOn defFile.config.depends.collect{defFileToTaskName(target, it)}
|
||||||
@@ -293,6 +295,7 @@ targetList.each { target ->
|
|||||||
'libraries' : defFile.config.depends.join(" ")
|
'libraries' : defFile.config.depends.join(" ")
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
platformLibs.dependsOn(libTask)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user