proton-mail-android/build.gradle.kts

62 lines
1.6 KiB
Plaintext
Raw Normal View History

2020-04-16 15:44:53 +00:00
/*
* Copyright (c) 2020 Proton Technologies AG
*
2020-04-16 15:44:53 +00:00
* This file is part of ProtonMail.
*
2020-04-16 15:44:53 +00:00
* ProtonMail is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
2020-04-16 15:44:53 +00:00
* ProtonMail is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
2020-04-16 15:44:53 +00:00
* You should have received a copy of the GNU General Public License
* along with ProtonMail. If not, see https://www.gnu.org/licenses/.
*/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2020-05-05 10:53:23 +00:00
initVersions()
2020-04-16 15:44:53 +00:00
buildscript {
repositories(repos)
dependencies(classpathDependencies)
}
plugins {
2020-05-05 10:53:23 +00:00
`sonarQube`
2020-04-16 15:44:53 +00:00
}
allprojects {
repositories(repos)
2020-04-16 15:44:53 +00:00
}
subprojects {
// Options for Kotlin
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs +
"-XXLanguage:+NewInference" +
"-Xuse-experimental=kotlin.Experimental"
2020-04-16 15:44:53 +00:00
}
}
// Disable Javadoc
tasks.withType<Javadoc> { enabled = false }
}
tasks.register("clean", Delete::class.java) {
delete(rootProject.buildDir)
}
tasks.register("injectLicenses") {
description = "Add license header to source code files"
apply(from = "scripts/inject_licenses/InjectLicenses.gradle.kts")
}