Skip to content

Commit

Permalink
Support android
Browse files Browse the repository at this point in the history
  • Loading branch information
Enaium committed Jan 2, 2025
1 parent ab1e86a commit 822fd48
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
kotlin.code.style=official
version=0.0.20
version=0.0.22
3 changes: 3 additions & 0 deletions src/main/kotlin/cn/enaium/jimmer/gradle/JimmerPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ class JimmerPlugin : Plugin<Project> {
}

fun addInputs(task: Task) {
if (!afterProject.plugins.hasKsp) {
return
}
kspArguments(afterProject.extensions.getByName("ksp"))[DTO_DIRS]?.let { dirs ->
dirs.split("\\s*[,:;]\\s*".toRegex()).mapNotNull {
when {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ open class AllProjectDependencies : DefaultTask() {
val allProjects = rootProject.allprojects
val map = mutableMapOf<String, List<String>>()
allProjects.forEach { p ->
map[p.name] = p.configurations.named("runtimeClasspath").get().map { it.absolutePath }
p.configurations.named { it == "runtimeClasspath" }.takeIf { it.isNotEmpty() }
?.named("runtimeClasspath")
?.also {
map[p.name] = it.get().map { it.absolutePath }
}
p.configurations.named { it == "debugRuntimeClasspath" }.takeIf { it.isNotEmpty() }
?.named("debugRuntimeClasspath")?.also {
map[p.name] = it.get().map { it.absolutePath }
}
}
rootProject.logger.lifecycle(jacksonObjectMapper().writeValueAsString(map))
}
Expand Down

0 comments on commit 822fd48

Please sign in to comment.