Skip to content
Permalink
Browse files

Gradle: Migrate the settings file to Kotlin script

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@here.com>
  • Loading branch information...
sschuberth committed Apr 9, 2019
1 parent 94d6bb8 commit 1b8ba335554efdb07e210a08f4e9a0d1300d5261
Showing with 37 additions and 35 deletions.
  1. +0 −35 settings.gradle
  2. +37 −0 settings.gradle.kts

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,37 @@
pluginManagement {
resolutionStrategy {
eachPlugin {
// Work around https://github.com/gradle/gradle/issues/1697.
if (requested.id.namespace != null && requested.version == null) {
val versionPropertyName = if (requested.id.id == "org.jetbrains.kotlin.jvm") {
"kotlinPluginVersion"
} else {
val pluginName = requested.id.name.split('-').joinToString("") { it.capitalize() }.decapitalize()
"${pluginName}PluginVersion"
}

logger.info("Checking for plugin version property '$versionPropertyName'.")

gradle.rootProject.properties[versionPropertyName]?.let { version ->
logger.info("Setting '${requested.id.id}' plugin version to $version.")
useVersion(version.toString())
} ?: logger.warn("No version specified for plugin '${requested.id.id}' and property " +
"'$versionPropertyName' does not exist.")
}
}
}
}

rootProject.name = "oss-review-toolkit"

include("analyzer")
include("cli")
include("downloader")
include("evaluator")
include("model")
include("reporter")
include("reporter-web-app")
include("scanner")
include("spdx-utils")
include("test-utils")
include("utils")

0 comments on commit 1b8ba33

Please sign in to comment.
You can’t perform that action at this time.