Skip to content

Commit 07d83e2

Browse files
committed
generate bootstrup script for Xcode
1 parent a5bab12 commit 07d83e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SharedCode/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ task packForXCode(type: Sync) {
4242

4343
from { kotlin.targets."$target".compilations.main.getBinary("FRAMEWORK", mode).parentFile }
4444
into frameworkDir
45+
46+
doLast {
47+
new File(frameworkDir, 'build.sh').with {
48+
text = "#!/bin/bash\nexport 'JAVA_HOME=${System.getProperty("java.home")}'\ncd '${rootProject.rootDir}'\n./gradlew \$@\n"
49+
setExecutable(true)
50+
}
51+
}
4552
}
4653

4754
tasks.build.dependsOn packForXCode

0 commit comments

Comments
 (0)