Skip to content

Commit

Permalink
Refactor BuildConfig aliases.
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipDolnik committed May 9, 2024
1 parent 7f0de83 commit 8478a7a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion SKIE/acceptance-tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package co.touchlab.skie.plugin.util
package co.touchlab.skie.util

// Workaround for limitation of BuildConfig plugin - as of time of writing it cannot declare generic types

typealias StringMap = Map<String, String>

typealias StringArray = Array<String>
4 changes: 2 additions & 2 deletions SKIE/skie-gradle/plugin-impl/gradle-plugin-impl.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ buildConfig {
)

buildConfigField("String", "SKIE_GRADLE_SHIM_IMPL_COORDINATE", "")
buildConfigField("co.touchlab.skie.plugin.util.StringMap", "KOTLIN_TO_SKIE_VERSION", "")
buildConfigField("co.touchlab.skie.util.StringMap", "KOTLIN_TO_SKIE_VERSION", "")
buildConfigField("String", "SKIE_VERSION", "")
buildConfigField("String", "SKIE_KOTLIN_PLUGIN_COORDINATE", "")
buildConfigField("String", "SKIE_KOTLIN_RUNTIME_COORDINATE", "")
Expand Down Expand Up @@ -83,7 +83,7 @@ multiDimensionTarget.configureSourceSet { sourceSet ->
"${version.toString().enquoted()} to ${name.toString().enquoted()}"
}

buildConfigField("co.touchlab.skie.plugin.util.StringMap", "KOTLIN_TO_SKIE_VERSION", "mapOf($kotlinToSkieKgpVersion)")
buildConfigField("co.touchlab.skie.util.StringMap", "KOTLIN_TO_SKIE_VERSION", "mapOf($kotlinToSkieKgpVersion)")

buildConfigField("String", "SKIE_VERSION", "\"${project.version}\"")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ abstract class DevAcceptanceTests : Plugin<Project> {
value = "",
)
buildConfigField(
type = "co.touchlab.skie.acceptancetests.util.StringArray",
type = "co.touchlab.skie.util.StringArray",
name = "DEPENDENCIES",
value = "",
)
buildConfigField(
type = "co.touchlab.skie.acceptancetests.util.StringArray",
type = "co.touchlab.skie.util.StringArray",
name = "EXPORTED_DEPENDENCIES",
value = "",
)
Expand Down Expand Up @@ -298,12 +298,12 @@ abstract class DevAcceptanceTests : Plugin<Project> {
.map { it.asFile.absolutePath.enquoted() },
)
buildConfigField(
type = "co.touchlab.skie.acceptancetests.util.StringArray",
type = "co.touchlab.skie.util.StringArray",
name = "DEPENDENCIES",
value = resolvedDependencies.map { "arrayOf(${it.toListString()})" },
)
buildConfigField(
type = "co.touchlab.skie.acceptancetests.util.StringArray",
type = "co.touchlab.skie.util.StringArray",
name = "EXPORTED_DEPENDENCIES",
value = exportedDependencies.map { "arrayOf(${it.toListString()})" },
)
Expand Down

0 comments on commit 8478a7a

Please sign in to comment.