Skip to content

Commit 85ca1d8

Browse files
authored
Merge pull request #83 from icerockdev/#75-fat-framework-with-resources-task
#75: fat framework gradle task
2 parents ee63685 + 01450f7 commit 85ca1d8

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
package dev.icerock.gradle.generator
6+
7+
import org.gradle.api.tasks.TaskAction
8+
import org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask
9+
10+
open class FatFrameworkWithResourcesTask : FatFrameworkTask() {
11+
12+
@TaskAction
13+
protected fun copyBundle() {
14+
super.createFatFramework()
15+
16+
frameworks.first().outputFile.listFiles()
17+
?.asSequence()
18+
?.filter { it.name.contains(".bundle") }
19+
?.forEach { bundleFile ->
20+
project.copy {
21+
from(bundleFile) {
22+
into(bundleFile.name)
23+
}
24+
into(fatFrameworkDir)
25+
}
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)