Native: extract license packing into a function
This commit is contained in:
committed by
Space
parent
71deeab57c
commit
3898c52454
@@ -536,11 +536,6 @@ task bundleRegular(type: (isWindows()) ? Zip : Tar) {
|
||||
exclude 'klib/cache/*/org.jetbrains.kotlin.native.platform.*/**'
|
||||
into archiveBaseName
|
||||
}
|
||||
from(project.projectDir) {
|
||||
include 'licenses/**'
|
||||
exclude '**/xcode_license.pdf'
|
||||
into archiveBaseName
|
||||
}
|
||||
}
|
||||
|
||||
task bundlePrebuilt(type: (isWindows()) ? Zip : Tar) {
|
||||
@@ -553,15 +548,21 @@ task bundlePrebuilt(type: (isWindows()) ? Zip : Tar) {
|
||||
exclude 'klib/testLibrary'
|
||||
into archiveBaseName
|
||||
}
|
||||
from(project.projectDir) {
|
||||
}
|
||||
|
||||
void configurePackingLicensesToBundle(AbstractArchiveTask task, boolean containsPlatformLibraries) {
|
||||
task.from(project.projectDir) {
|
||||
include 'licenses/**'
|
||||
if (!isMac()) {
|
||||
if (!containsPlatformLibraries || !isMac()) {
|
||||
exclude '**/xcode_license.pdf'
|
||||
}
|
||||
into archiveBaseName
|
||||
into task.archiveBaseName
|
||||
}
|
||||
}
|
||||
|
||||
configurePackingLicensesToBundle(bundleRegular, /* containsPlatformLibraries = */ false)
|
||||
configurePackingLicensesToBundle(bundlePrebuilt, /* containsPlatformLibraries = */ true)
|
||||
|
||||
configure([bundleRegular, bundlePrebuilt]) {
|
||||
dependsOn("crossDist")
|
||||
dependsOn("crossDistStdlibCache")
|
||||
|
||||
Reference in New Issue
Block a user