Add an IT for publication of multiplatform resources in a native target
^KT-65540
This commit is contained in:
committed by
Space Team
parent
b145796e14
commit
e35e2eaa48
+16
@@ -77,6 +77,22 @@ class MultiplatformResourcesPublicationIT : KGPBaseTest() {
|
||||
)
|
||||
}
|
||||
|
||||
@DisplayName("Multiplatform resources publication for Native target")
|
||||
@GradleAndroidTest
|
||||
fun testNativeTargetResourcesPublication(
|
||||
gradleVersion: GradleVersion,
|
||||
androidVersion: String,
|
||||
providedJdk: JdkVersions.ProvidedJdk,
|
||||
) {
|
||||
testEmbeddedResources(
|
||||
gradleVersion,
|
||||
androidVersion,
|
||||
providedJdk,
|
||||
publicationTask = ":publishLinuxX64PublicationToMavenRepository",
|
||||
publishedArchive = "build/repo/test/publication-linuxx64/1.0/publication-linuxx64-1.0-kotlin_resources.kotlin_resources.zip",
|
||||
referenceName = "linuxX64",
|
||||
)
|
||||
}
|
||||
private fun testEmbeddedResources(
|
||||
gradleVersion: GradleVersion,
|
||||
androidVersion: String,
|
||||
|
||||
+1
@@ -35,6 +35,7 @@ kotlin {
|
||||
}
|
||||
},
|
||||
jvm(),
|
||||
linuxX64(),
|
||||
).forEach { target ->
|
||||
val fontsFilter = if (target is KotlinAndroidTarget) listOf("fonts/*") else emptyList()
|
||||
val relativeResourcePlacement = provider { File("embed/subproject") }
|
||||
|
||||
+5
-2
@@ -35,9 +35,12 @@ kotlin {
|
||||
}
|
||||
},
|
||||
jvm(),
|
||||
linuxX64(),
|
||||
iosArm64(),
|
||||
iosSimulatorArm64(),
|
||||
).forEach { target ->
|
||||
val fontsFilter = if (target is KotlinAndroidTarget) listOf("fonts/*") else emptyList()
|
||||
val relativeResourcePlacement = provider { File("embed/published") }
|
||||
val relativeResourcePlacement = provider { File("embed/${project.name}") }
|
||||
val sourceSetPathProvider: (KotlinSourceSet) -> (Provider<File>) = { sourceSet ->
|
||||
project.provider { project.file("src/${sourceSet.name}/multiplatformResources") }
|
||||
}
|
||||
@@ -76,7 +79,7 @@ publishing {
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "test.publication"
|
||||
namespace = "test.${project.name}"
|
||||
compileSdk = 34
|
||||
defaultConfig {
|
||||
minSdk = 24
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
inCommon
|
||||
+1
@@ -0,0 +1 @@
|
||||
innerInCommon
|
||||
+1
@@ -0,0 +1 @@
|
||||
linuxX64Override
|
||||
+1
@@ -0,0 +1 @@
|
||||
onlyInLinuxX64
|
||||
+1
@@ -0,0 +1 @@
|
||||
linuxX64Override
|
||||
Reference in New Issue
Block a user