[build][restrict] adds restricted bundle build/upload target
This commit is contained in:
+38
-10
@@ -404,9 +404,6 @@ task crossDist {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task bundle(type: (isWindows()) ? Zip : Tar) {
|
task bundle(type: (isWindows()) ? Zip : Tar) {
|
||||||
dependsOn('crossDistPlatformLibs')
|
|
||||||
dependsOn('crossDist')
|
|
||||||
dependsOn('distSources')
|
|
||||||
def simpleOsName = HostManager.simpleOsName()
|
def simpleOsName = HostManager.simpleOsName()
|
||||||
baseName = "kotlin-native-$simpleOsName-$konanVersionFull"
|
baseName = "kotlin-native-$simpleOsName-$konanVersionFull"
|
||||||
from("$project.rootDir/dist") {
|
from("$project.rootDir/dist") {
|
||||||
@@ -415,6 +412,36 @@ task bundle(type: (isWindows()) ? Zip : Tar) {
|
|||||||
exclude 'klib/testLibrary'
|
exclude 'klib/testLibrary'
|
||||||
into baseName
|
into baseName
|
||||||
}
|
}
|
||||||
|
if (isWindows()) {
|
||||||
|
zip64 true
|
||||||
|
} else {
|
||||||
|
extension = 'tar.gz'
|
||||||
|
compression = Compression.GZIP
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task bundleRestricted(type: Tar) {
|
||||||
|
def simpleOsName = HostManager.simpleOsName()
|
||||||
|
baseName = "kotlin-native-restricted-$simpleOsName-$konanVersionFull"
|
||||||
|
from("$project.rootDir/dist") {
|
||||||
|
include '**'
|
||||||
|
exclude 'dependencies'
|
||||||
|
exclude 'klib/testLibrary'
|
||||||
|
exclude 'klib/platform/macos_x64'
|
||||||
|
exclude 'klib/platform/ios_x64'
|
||||||
|
exclude 'klib/platform/ios_arm64'
|
||||||
|
exclude 'klib/platform/ios_arm32'
|
||||||
|
into baseName
|
||||||
|
}
|
||||||
|
|
||||||
|
extension = 'tar.gz'
|
||||||
|
compression = Compression.GZIP
|
||||||
|
}
|
||||||
|
|
||||||
|
configure([bundle, bundleRestricted]) {
|
||||||
|
dependsOn('crossDistPlatformLibs')
|
||||||
|
dependsOn('crossDist')
|
||||||
|
dependsOn('distSources')
|
||||||
from(project.rootDir) {
|
from(project.rootDir) {
|
||||||
include 'DISTRO_README.md'
|
include 'DISTRO_README.md'
|
||||||
rename {
|
rename {
|
||||||
@@ -432,13 +459,6 @@ task bundle(type: (isWindows()) ? Zip : Tar) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
destinationDir = file('.')
|
destinationDir = file('.')
|
||||||
|
|
||||||
if (isWindows()) {
|
|
||||||
zip64 true
|
|
||||||
} else {
|
|
||||||
extension = 'tar.gz'
|
|
||||||
compression = Compression.GZIP
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task 'tc-dist'(type: (isWindows()) ? Zip : Tar) {
|
task 'tc-dist'(type: (isWindows()) ? Zip : Tar) {
|
||||||
@@ -514,6 +534,9 @@ task copySamples(type: CopySamples) {
|
|||||||
|
|
||||||
task uploadBundle {
|
task uploadBundle {
|
||||||
dependsOn ':bundle'
|
dependsOn ':bundle'
|
||||||
|
if (isMac()) {
|
||||||
|
dependsOn ':bundleRestricted'
|
||||||
|
}
|
||||||
doLast {
|
doLast {
|
||||||
def kind = (konanVersionFull.meta == MetaVersion.DEV) ? "dev" : "releases"
|
def kind = (konanVersionFull.meta == MetaVersion.DEV) ? "dev" : "releases"
|
||||||
def ftpSettings = [
|
def ftpSettings = [
|
||||||
@@ -530,6 +553,11 @@ task uploadBundle {
|
|||||||
ftp(ftpSettings) {
|
ftp(ftpSettings) {
|
||||||
fileset(file: bundle.archivePath)
|
fileset(file: bundle.archivePath)
|
||||||
}
|
}
|
||||||
|
if (isMac()) {
|
||||||
|
ftp(ftpSettings) {
|
||||||
|
fileset(file: bundleRestricted.archivePath)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user