diff --git a/README.md b/README.md index 4d05967..f6d1084 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,14 @@ The plugin is available in the [Gradle plugins repository](https://plugins.gradl Kotlin: ```kotlin plugins { - id("io.github.adityabhaskar.dependencygraph") version "0.1.4" + id("io.github.adityabhaskar.dependencygraph") version "" } ``` Groovy: ```groovy plugins { - id "io.github.adityabhaskar.dependencygraph" version "0.1.4" + id "io.github.adityabhaskar.dependencygraph" version "" } ``` @@ -173,4 +173,4 @@ Feel free to open a issue or submit a pull request for any bugs/improvements. ## License 📄 -This template is licensed under the MIT License - see the [License](License) file for details. \ No newline at end of file +This template is licensed under the MIT License - see the [License](License) file for details. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 68d057d..706bea3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,6 +4,8 @@ kotlin = "1.9.23" ktlintGradle = "11.6.1" pluginPublish = "1.2.1" versionCheck = "0.51.0" +android-lint = "8.3.0" +android-lint-gradle = "1.0.0-alpha01" [plugins] detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt"} @@ -11,6 +13,8 @@ kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin"} ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlintGradle"} pluginPublish = { id = "com.gradle.plugin-publish", version.ref = "pluginPublish"} versionCheck = { id = "com.github.ben-manes.versions", version.ref = "versionCheck"} +lint = { id = "com.android.lint", version.ref = "android-lint"} [libraries] junit = "junit:junit:4.13.2" +android-lint-gradle = { module = "androidx.lint:lint-gradle", version.ref = "android-lint-gradle" } \ No newline at end of file diff --git a/plugin-build/gradle.properties b/plugin-build/gradle.properties index 0eb4866..14d60f4 100644 --- a/plugin-build/gradle.properties +++ b/plugin-build/gradle.properties @@ -1,5 +1,5 @@ ID=io.github.adityabhaskar.dependencygraph -VERSION=0.1.5 +VERSION=0.1.6 GROUP=io.github.adityabhaskar DISPLAY_NAME=Gradle module dependency graphs DESCRIPTION=A plugin to automatically produce Github/mermaid compatible dependency graphs diff --git a/plugin-build/plugin/build.gradle.kts b/plugin-build/plugin/build.gradle.kts index 629e19d..e41abfd 100644 --- a/plugin-build/plugin/build.gradle.kts +++ b/plugin-build/plugin/build.gradle.kts @@ -1,16 +1,18 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -@Suppress("DSL_SCOPE_VIOLATION") plugins { kotlin("jvm") `java-gradle-plugin` alias(libs.plugins.pluginPublish) + alias(libs.plugins.lint) } dependencies { implementation(kotlin("stdlib")) implementation(gradleApi()) + lintChecks(libs.android.lint.gradle) + testImplementation(libs.junit) } diff --git a/plugin-build/plugin/src/main/kotlin/io/github/adityabhaskar/dependencygraph/plugin/core/ParseGraph.kt b/plugin-build/plugin/src/main/kotlin/io/github/adityabhaskar/dependencygraph/plugin/core/ParseGraph.kt index 9dc3ff4..3881ea3 100644 --- a/plugin-build/plugin/src/main/kotlin/io/github/adityabhaskar/dependencygraph/plugin/core/ParseGraph.kt +++ b/plugin-build/plugin/src/main/kotlin/io/github/adityabhaskar/dependencygraph/plugin/core/ParseGraph.kt @@ -65,9 +65,9 @@ internal fun parseDependencyGraph( javaProjects.add(project) } - project.configurations.all { config -> + project.configurations.configureEach { config -> config.dependencies - .filterIsInstance(ProjectDependency::class.java) + .filterIsInstance() .map { it.dependencyProject } .filter { it.path !in ignoredModules } .forEach { dependency -> @@ -100,7 +100,7 @@ internal fun parseDependencyGraph( val allDependencies = it.configurations .map { config -> config.dependencies - .filterIsInstance(ProjectDependency::class.java) + .filterIsInstance() .filter { dependency -> dependency.dependencyProject.path != it.path } diff --git a/plugin-build/settings.gradle.kts b/plugin-build/settings.gradle.kts index 5d94b44..d75dbd5 100644 --- a/plugin-build/settings.gradle.kts +++ b/plugin-build/settings.gradle.kts @@ -2,6 +2,7 @@ pluginManagement { repositories { gradlePluginPortal() mavenCentral() + google() } }