-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…es-task #75: fat framework gradle task
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
gradle-plugin/src/main/kotlin/dev/icerock/gradle/generator/FatFrameworkWithResourcesTask.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package dev.icerock.gradle.generator | ||
|
||
import org.gradle.api.tasks.TaskAction | ||
import org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask | ||
|
||
open class FatFrameworkWithResourcesTask : FatFrameworkTask() { | ||
|
||
@TaskAction | ||
protected fun copyBundle() { | ||
super.createFatFramework() | ||
|
||
frameworks.first().outputFile.listFiles() | ||
?.asSequence() | ||
?.filter { it.name.contains(".bundle") } | ||
?.forEach { bundleFile -> | ||
project.copy { | ||
from(bundleFile) { | ||
into(bundleFile.name) | ||
} | ||
into(fatFrameworkDir) | ||
} | ||
} | ||
} | ||
} |