Skip to content

Commit

Permalink
Merge pull request #83 from icerockdev/#75-fat-framework-with-resourc…
Browse files Browse the repository at this point in the history
…es-task

#75: fat framework gradle task
  • Loading branch information
Alex009 committed Jun 2, 2020
2 parents ee63685 + 01450f7 commit 85ca1d8
Showing 1 changed file with 28 additions and 0 deletions.
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)
}
}
}
}

0 comments on commit 85ca1d8

Please sign in to comment.