Skip to content

Commit

Permalink
fixed core processor versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
programadorthi committed Nov 17, 2024
1 parent 7166ae8 commit a1079a8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
6 changes: 6 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ espresso-core = "3.5.1"
lifecycle-runtime-ktx = "2.3.1"
activity-compose = "1.5.1"
compose-bom = "2022.10.00"
routing = "2.0.0-alpha02"
# SAMPLE VERSIONS #

[libraries]
Expand Down Expand Up @@ -83,6 +84,10 @@ ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview
ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
material3 = { group = "androidx.compose.material3", name = "material3" }
routing-core = { module = "dev.programadorthi.routing:core", version.ref = "routing" }
routing-compose = { module = "dev.programadorthi.routing:compose", version.ref = "routing" }
routing-voyager = { module = "dev.programadorthi.routing:voyager", version.ref = "routing" }
routing-annotations = { module = "dev.programadorthi.routing:ksp-core-annotations", version.ref = "routing" }
# SAMPLE LIBRARIES #

[plugins]
Expand All @@ -91,3 +96,4 @@ jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "compose" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin"}
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "plugin-maven"}
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp"}
routing = { id = "dev.programadorthi.routing", version.ref = "routing"}
25 changes: 14 additions & 11 deletions ksp/gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ gradlePlugin {
}
}

val versionRegister = tasks.register<Exec>("version-register") {
commandLine(
"find", "./src",
"-type", "f",
"-exec",
"sed", "-i",
"''", """s/<version>/${providers.gradleProperty("version").get()}/g""",
"{}", "+"
)
if (project.hasProperty("version")) {
val versionProperty = project.property("version")
if (versionProperty != "unspecified") {
project.exec {
commandLine(
"find", "./src",
"-type", "f",
"-exec",
"sed", "-i",
"''", """s/<version>/$versionProperty/g""",
"{}", "+"
)
}
}
}

tasks.named("processResources").dependsOn(versionRegister)
21 changes: 13 additions & 8 deletions samples/ksp-sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
plugins {
kotlin("multiplatform")
alias(libs.plugins.ksp)
//id("dev.programadorthi.routing") version "0.0.99"
alias(libs.plugins.routing)
alias(libs.plugins.jetbrains.compose)
alias(libs.plugins.compose.compiler)
}
Expand All @@ -19,24 +19,29 @@ kotlin {
sourceSets {
commonMain {
dependencies {
implementation(projects.core)
implementation(projects.integration.compose)
implementation(projects.integration.voyager)
implementation(projects.ksp.coreAnnotations)
implementation(libs.routing.core)
implementation(libs.routing.compose)
implementation(libs.routing.voyager)
implementation(libs.routing.annotations)
implementation(compose.runtime)
}
}
}
}

dependencies {
/*dependencies {
add("kspJvm", projects.ksp.coreProcessor)
}
/*configurations.all {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("dev.programadorthi.routing:core"))
.using(project(":core"))
.because("KSP gradle plugin have maven central dependencies")
substitute(module("dev.programadorthi.routing:compose"))
.using(project(":integration:compose"))
substitute(module("dev.programadorthi.routing:voyager"))
.using(project(":integration:voyager"))
substitute(module("dev.programadorthi.routing:ksp-core-annotations"))
.using(project(":ksp:core-annotations"))
}
}*/

0 comments on commit a1079a8

Please sign in to comment.