@@ -5033,6 +5033,9 @@ compileTargets { t ->
5033
5033
def doStrip = targetProperties. containsKey(' strip' ) && IS_RELEASE
5034
5034
def strip = doStrip ? targetProperties. strip : null
5035
5035
def stripArgs = doStrip ? targetProperties. stripArgs : null
5036
+ def doSign = rootProject. hasProperty(' codeSignCmd' ) && IS_RELEASE
5037
+ def signCmd = doSign ? rootProject. ext. codeSignCmd : null
5038
+ def signArgs = doSign ? rootProject. ext. codeSignArgs : null
5036
5039
def useLipo = targetProperties. containsKey(' useLipo' ) ? targetProperties. useLipo : false
5037
5040
def modLibDest = targetProperties. modLibDest
5038
5041
def moduleNativeDirName = " ${ platformPrefix} module-$modLibDest "
@@ -5126,6 +5129,23 @@ compileTargets { t ->
5126
5129
}
5127
5130
}
5128
5131
}
5132
+ if (doSign) {
5133
+ doLast {
5134
+ def inputFiles = fileTree(dir : destDirName)
5135
+ inputFiles. include(" *.dll" )
5136
+ inputFiles. include(" *.dylib" )
5137
+ inputFiles. include(" *.so" )
5138
+ // FIXME: if we ever need to sign on Windows platforms, we must
5139
+ // exclude the Microsoft DLLs (VS2017DLLNames and WinSDKDLLNames)
5140
+
5141
+ inputFiles. each { file ->
5142
+ exec {
5143
+ def cmd = [ signCmd, signArgs, file ]. flatten()
5144
+ commandLine(cmd)
5145
+ }
5146
+ }
5147
+ }
5148
+ }
5129
5149
}
5130
5150
5131
5151
def buildModuleMediaTask = task(" buildModuleMedia$t. capital " , type : Copy , dependsOn : [mediaProject. assemble, prepOpenJfxStubs]) {
@@ -5180,6 +5200,23 @@ compileTargets { t ->
5180
5200
}
5181
5201
}
5182
5202
}
5203
+ if (doSign && IS_COMPILE_MEDIA ) {
5204
+ doLast {
5205
+ def inputFiles = fileTree(dir : destDirName)
5206
+ inputFiles. include(" *.dll" )
5207
+ inputFiles. include(" *.dylib" )
5208
+ inputFiles. include(" *.so" )
5209
+ // FIXME: if we ever need to sign on Windows platforms, we must
5210
+ // exclude the Microsoft DLLs (VS2017DLLNames and WinSDKDLLNames)
5211
+
5212
+ inputFiles. each { file ->
5213
+ exec {
5214
+ def cmd = [ signCmd, signArgs, file ]. flatten()
5215
+ commandLine(cmd)
5216
+ }
5217
+ }
5218
+ }
5219
+ }
5183
5220
}
5184
5221
5185
5222
def buildModuleWeb = task(" buildModuleWeb$t. capital " , type : Copy , dependsOn : [webProject. assemble, prepOpenJfxStubs]) {
@@ -5212,6 +5249,23 @@ compileTargets { t ->
5212
5249
}
5213
5250
}
5214
5251
}
5252
+ if (doSign && IS_COMPILE_WEBKIT ) {
5253
+ doLast {
5254
+ def inputFiles = fileTree(dir : destDirName)
5255
+ inputFiles. include(" *.dll" )
5256
+ inputFiles. include(" *.dylib" )
5257
+ inputFiles. include(" *.so" )
5258
+ // FIXME: if we ever need to sign on Windows platforms, we must
5259
+ // exclude the Microsoft DLLs (VS2017DLLNames and WinSDKDLLNames)
5260
+
5261
+ inputFiles. each { file ->
5262
+ exec {
5263
+ def cmd = [ signCmd, signArgs, file ]. flatten()
5264
+ commandLine(cmd)
5265
+ }
5266
+ }
5267
+ }
5268
+ }
5215
5269
}
5216
5270
5217
5271
def buildModuleSWT = task(" buildModuleSWT$t. capital " , type : Copy ) {
0 commit comments