File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -29,3 +29,25 @@ kotlin {
2929configurations {
3030 compileClasspath
3131}
32+
33+ task packForXCode (type : Sync ) {
34+ final File frameworkDir = new File (buildDir, " xcode-frameworks" )
35+ final String mode = System . getenv(' CONFIGURATION' )?. toUpperCase() ?: ' DEBUG'
36+ final String target = System . getenv(' SDK_NAME' )?. startsWith(" iphoneos" ) ? ' iOS' : ' iOSx64'
37+
38+ inputs. property " target" , target
39+ inputs. property " mode" , mode
40+ outputs. dir frameworkDir
41+ dependsOn kotlin. targets. " $target " . compilations. main. linkTaskName(" FRAMEWORK" , mode)
42+
43+ from { kotlin. targets. " $target " . compilations. main. getBinary(" FRAMEWORK" , mode). parentFile }
44+ into frameworkDir
45+
46+ doLast {
47+ new TreeMap (System . getenv()). forEach { k ,v ->
48+ println " $k =$v "
49+ }
50+ }
51+ }
52+
53+ tasks. build. dependsOn packForXCode
You can’t perform that action at this time.
0 commit comments