Skip to content

Commit

Permalink
utils: Move FileMatcher from core to common
Browse files Browse the repository at this point in the history
The code is not specific to ORT and can be useful for other modules.

Signed-off-by: Martin Nonnenmacher <[email protected]>
  • Loading branch information
mnonnenmacher committed Nov 2, 2021
1 parent 95fc30f commit fa375ef
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion model/src/main/kotlin/ScanSummary.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import java.util.SortedSet

import org.ossreviewtoolkit.model.config.LicenseFilenamePatterns
import org.ossreviewtoolkit.model.utils.RootLicenseMatcher
import org.ossreviewtoolkit.utils.core.FileMatcher
import org.ossreviewtoolkit.utils.common.FileMatcher
import org.ossreviewtoolkit.utils.spdx.SpdxExpression

/**
Expand Down
2 changes: 1 addition & 1 deletion model/src/main/kotlin/utils/FileArchiver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import kotlin.time.measureTime
import kotlin.time.measureTimedValue

import org.ossreviewtoolkit.model.KnownProvenance
import org.ossreviewtoolkit.utils.core.FileMatcher
import org.ossreviewtoolkit.utils.common.FileMatcher
import org.ossreviewtoolkit.utils.core.ORT_NAME
import org.ossreviewtoolkit.utils.core.collectMessagesAsString
import org.ossreviewtoolkit.utils.core.log
Expand Down
2 changes: 1 addition & 1 deletion model/src/main/kotlin/utils/RootLicenseMatcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import java.io.File

import org.ossreviewtoolkit.model.LicenseFinding
import org.ossreviewtoolkit.model.config.LicenseFilenamePatterns
import org.ossreviewtoolkit.utils.core.FileMatcher
import org.ossreviewtoolkit.utils.common.FileMatcher
import org.ossreviewtoolkit.utils.core.getAllAncestorDirectories

/**
Expand Down
6 changes: 6 additions & 0 deletions utils/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
* License-Filename: LICENSE
*/

val springCoreVersion: String by project

plugins {
// Apply core plugins.
`java-library`
}

dependencies {
implementation("org.springframework:spring-core:$springCoreVersion")
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* License-Filename: LICENSE
*/

package org.ossreviewtoolkit.utils.core
package org.ossreviewtoolkit.utils.common

import org.springframework.util.AntPathMatcher

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* License-Filename: LICENSE
*/

package org.ossreviewtoolkit.utils.core
package org.ossreviewtoolkit.utils.common

import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.shouldBe
Expand Down
2 changes: 0 additions & 2 deletions utils/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ val log4jApiKotlinVersion: String by project
val mockkVersion: String by project
val okhttpVersion: String by project
val semverVersion: String by project
val springCoreVersion: String by project
val xzVersion: String by project

plugins {
Expand All @@ -49,7 +48,6 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-scripting-jsr223")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion")
implementation("org.springframework:spring-core:$springCoreVersion")
implementation("org.tukaani:xz:$xzVersion")

testImplementation("io.mockk:mockk:$mockkVersion")
Expand Down

0 comments on commit fa375ef

Please sign in to comment.