Skip to content

Commit

Permalink
Adopted importClasses plugin (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzo authored Dec 19, 2024
1 parent 72053df commit eeab915
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
10 changes: 6 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@ kotlin = "2.1.0"
android = "8.7.3"

[libraries]
apache-bcel = "org.apache.bcel:bcel:6.10.0"
jgit = "org.eclipse.jgit:org.eclipse.jgit:6.10.0.202406032230-r"
junit-bom = "org.junit:junit-bom:5.11.4"
apache-bcel = { module = "org.apache.bcel:bcel", version = "6.10.0" }
jgit = { module = "org.eclipse.jgit:org.eclipse.jgit", version = "6.10.0.202406032230-r" }
junit-bom = { module = "org.junit:junit-bom", version = "5.11.4" }
junit-params = { module = "org.junit.jupiter:junit-jupiter-params" }
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlin-plugin-api = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin-api", version.ref = "kotlin" }
kotlin-plugin-compiler-api = { module = "org.jetbrains.kotlin:kotlin-compiler", version.ref = "kotlin" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
slf4j = { module = "org.slf4j:slf4j-api", version = "2.0.16" }

[plugins]
android-application = { id = "com.android.application", version.ref = "android" }
android-library = { id = "com.android.library", version.ref = "android" }
buildConfig = "com.github.gmazzo.buildconfig:5.5.1"
buildConfig = { id = "com.github.gmazzo.buildconfig", version = "5.5.1" }
importClasses = { id = "io.github.gmazzo.importclasses", version = "1.0.0" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ tasks.jar {
}
}
})
duplicatesStrategy = DuplicatesStrategy.WARN
}
15 changes: 13 additions & 2 deletions plugins/matcher/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.importClasses)
`jvm-convention-module`
`embedded-dependencies`
}

description = "CodeOwners Matcher Library"

dependencies {
implementation(libs.jgit)
sourceSets.main {
importClasses(libs.jgit) {
repackageTo = "io.github.gmazzo.codeowners.matcher.jgit"
keep("org.eclipse.jgit.ignore.FastIgnoreRule")

exclude("META-INF/**/module-info.class")
include("**.class")
exclude("**.*")
}
}

dependencies {
implementation(libs.slf4j) // transitive of libs.jgit, required by FastIgnoreRule
testImplementation(libs.junit.params)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.gmazzo.codeowners.matcher

import org.eclipse.jgit.ignore.FastIgnoreRule
import io.github.gmazzo.codeowners.matcher.jgit.FastIgnoreRule
import java.io.File

class CodeOwnersMatcher(
Expand Down

0 comments on commit eeab915

Please sign in to comment.