forked from awslabs/aws-crt-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
71 lines (61 loc) · 1.7 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import aws.sdk.kotlin.gradle.dsl.configureLinting
import aws.sdk.kotlin.gradle.dsl.configureNexus
import aws.sdk.kotlin.gradle.util.typedProp
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
}
plugins {
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2"
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.aws.kotlin.repo.tools.kmp)
alias(libs.plugins.aws.kotlin.repo.tools.artifactsizemetrics)
}
artifactSizeMetrics {
artifactPrefixes = setOf(":aws-crt-kotlin")
significantChangeThresholdPercentage = 5.0
projectRepositoryName = "aws-crt-kotlin"
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile> {
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}
if (project.typedProp<Boolean>("kotlinWarningsAsErrors") == true) {
allprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.allWarningsAsErrors = true
}
}
}
// Publishing
configureNexus()
// Code Style
val lintPaths = listOf(
"**/*.{kt,kts}",
)
configureLinting(lintPaths)
apiValidation {
ignoredProjects += setOf("elasticurl")
}