Created
November 22, 2021 15:39
-
-
Save Alex009/6f8d47a925b75259341cab3356cd4d7a to your computer and use it in GitHub Desktop.
Welcome Feature Gradle Build File
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
import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType | |
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget | |
import dev.icerock.gradle.generator.FatFrameworkWithResourcesTask | |
plugins { | |
kotlin(module = "multiplatform") | |
id("com.android.library") | |
id("dev.icerock.mobile.multiplatform-resources") | |
} | |
multiplatformResources { | |
multiplatformResourcesPackage = "*PACKAGE_NAME*.feature_welcome" | |
iosBaseLocalizationRegion = "ru" | |
} | |
android { | |
compileSdk = 31 | |
sourceSets["main"].manifest.srcFile(srcPath = "src/commonMain/AndroidManifest.xml") | |
defaultConfig { | |
minSdk = 21 | |
targetSdk = 31 | |
} | |
} | |
kotlin { | |
android() | |
listOf( | |
iosX64(), | |
iosArm64(), | |
iosSimulatorArm64() | |
).forEach { target -> | |
target.binaries.framework { | |
baseName = "feature_welcome" | |
export(dependency = libs.moko.resources) | |
} | |
} | |
sourceSets { | |
val commonMain by getting { | |
dependencies { | |
implementation(dependencyNotation = libs.moko.resources) | |
implementation(dependencyNotation = libs.decompose.common) | |
implementation(dependencyNotation = libs.bundles.mvikotlin.common) | |
} | |
} | |
} | |
tasks.register(name = "debugFatFramework", type = FatFrameworkWithResourcesTask::class) { | |
baseName = "multiplatform" | |
from( | |
mapOf<String, KotlinNativeTarget>( | |
"iosX64" to kotlin.targets.getByName(name = "iosX64"), | |
"iosArm64" to kotlin.targets.getByName(name = "iosArm64") | |
).toList().map { pair -> | |
pair.second.binaries.getFramework( | |
buildType = NativeBuildType.DEBUG | |
) | |
} | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment