Build: Add build scan server url setting

This commit is contained in:
Vyacheslav Gerasimov
2019-12-13 18:47:12 +03:00
parent 724884513e
commit 8d303af395
5 changed files with 17 additions and 9 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ buildscript {
} }
dependencies { dependencies {
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.5") classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.6")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$buildSrcKotlinVersion") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$buildSrcKotlinVersion")
classpath("org.jetbrains.kotlin:kotlin-sam-with-receiver:$buildSrcKotlinVersion") classpath("org.jetbrains.kotlin:kotlin-sam-with-receiver:$buildSrcKotlinVersion")
} }
@@ -94,7 +94,7 @@ repositories {
dependencies { dependencies {
implementation(kotlin("stdlib", embeddedKotlinVersion)) implementation(kotlin("stdlib", embeddedKotlinVersion))
implementation("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.5") implementation("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.6")
implementation("net.rubygrapefruit:native-platform:${property("versions.native-platform")}") implementation("net.rubygrapefruit:native-platform:${property("versions.native-platform")}")
implementation("net.rubygrapefruit:native-platform-windows-amd64:${property("versions.native-platform")}") implementation("net.rubygrapefruit:native-platform-windows-amd64:${property("versions.native-platform")}")
+1 -1
View File
@@ -20,7 +20,7 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.5") classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.6")
} }
} }
+1 -1
View File
@@ -4,7 +4,7 @@ plugins {
} }
group = "org.jetbrains.kotlin" group = "org.jetbrains.kotlin"
version = "0.0.5" version = "0.0.6"
repositories { repositories {
mavenCentral() mavenCentral()
@@ -90,6 +90,8 @@ class KotlinBuildProperties(
val pushToBuildCache: Boolean = getBoolean("kotlin.build.cache.push", isTeamcityBuild) val pushToBuildCache: Boolean = getBoolean("kotlin.build.cache.push", isTeamcityBuild)
val localBuildCacheEnabled: Boolean = getBoolean("kotlin.build.cache.local.enabled", !isTeamcityBuild) val localBuildCacheEnabled: Boolean = getBoolean("kotlin.build.cache.local.enabled", !isTeamcityBuild)
val buildScanServer: String? = get("kotlin.build.scan.url") as String?
} }
private const val extensionName = "kotlinBuildProperties" private const val extensionName = "kotlinBuildProperties"
+11 -5
View File
@@ -31,7 +31,7 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.5") classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.6")
} }
} }
@@ -39,15 +39,21 @@ plugins {
id "com.gradle.enterprise" version "3.0" id "com.gradle.enterprise" version "3.0"
} }
def buildProperties = BuildPropertiesKt.getKotlinBuildPropertiesForSettings(settings)
gradleEnterprise { gradleEnterprise {
buildScan { buildScan {
setTermsOfServiceUrl("https://gradle.com/terms-of-service") if (buildProperties.buildScanServer != null) {
setTermsOfServiceAgree("yes") server = buildProperties.buildScanServer
allowUntrustedServer = true
publishAlways()
} else {
setTermsOfServiceUrl("https://gradle.com/terms-of-service")
setTermsOfServiceAgree("yes")
}
} }
} }
def buildProperties = BuildPropertiesKt.getKotlinBuildPropertiesForSettings(settings)
BuildCacheKt.setupBuildCache(settings) BuildCacheKt.setupBuildCache(settings)
// modules // modules