2020-03-03 18:44:54 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
apply plugin: 'java-library'
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
|
2021-07-22 15:16:52 +00:00
|
|
|
repositories {
|
|
|
|
if (project.hasProperty("centralRepo")) {
|
|
|
|
maven {
|
|
|
|
name "MavenCentral"
|
|
|
|
url project.property("centralRepo")
|
2021-07-22 16:28:06 +00:00
|
|
|
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
2021-07-22 15:16:52 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-03 18:44:54 +00:00
|
|
|
dependencies {
|
2020-10-21 17:56:53 +00:00
|
|
|
// I didn't look thoroughly enough to really know what's going on here but I think
|
|
|
|
// the lint API uses jdk8 so if we provide jdk7, the dependency collision system
|
|
|
|
// doesn't work and there are duplicate APIs with different versions in the output.
|
|
|
|
//
|
|
|
|
// The prepareLintJar task fails with "Found more than one jar in the 'lintChecks' configuration"
|
|
|
|
// if we include the stdlib (with implementation) so we have to do compileOnly + testImplementation.
|
|
|
|
compileOnly Deps.kotlin_stdlib_jdk8
|
2020-10-19 18:07:47 +00:00
|
|
|
compileOnly Deps.kotlin_reflect
|
2020-10-21 17:56:53 +00:00
|
|
|
testImplementation Deps.kotlin_stdlib_jdk8
|
|
|
|
testImplementation Deps.kotlin_reflect
|
2020-10-19 18:07:47 +00:00
|
|
|
|
2020-10-02 22:29:56 +00:00
|
|
|
compileOnly "com.android.tools.lint:lint-api:${Versions.android_lint_api}"
|
|
|
|
compileOnly "com.android.tools.lint:lint-checks:${Versions.android_lint_api}"
|
2020-10-17 00:41:08 +00:00
|
|
|
|
2021-07-22 15:16:52 +00:00
|
|
|
testImplementation "junit:junit:4.13.2"
|
2020-10-17 00:41:08 +00:00
|
|
|
testImplementation "com.android.tools.lint:lint:${Versions.android_lint_api}"
|
|
|
|
testImplementation "com.android.tools.lint:lint-tests:${Versions.android_lint_api}"
|
2020-03-03 18:44:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes('Lint-Registry-v2': 'org.mozilla.fenix.lintrules.LintIssueRegistry')
|
|
|
|
}
|
|
|
|
}
|