111 lines
5.0 KiB
Groovy
Executable File
111 lines
5.0 KiB
Groovy
Executable File
import org.gradle.util.VersionNumber
|
|
|
|
/*
|
|
* Copyright (C) 2017. Uber Technologies
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
// The oldest version of Error Prone that we support running on
|
|
def oldestErrorProneApi = "2.4.0"
|
|
|
|
if (project.hasProperty("epApiVersion")) {
|
|
def epApiVNum = VersionNumber.parse(epApiVersion)
|
|
if (epApiVNum.equals(VersionNumber.UNKNOWN)) {
|
|
throw new IllegalArgumentException("Invalid Error Prone API version " + epApiVersion)
|
|
}
|
|
if (epApiVNum.compareTo(VersionNumber.parse(oldestErrorProneApi)) < 0) {
|
|
throw new IllegalArgumentException(
|
|
"Error Prone API version " + epApiVersion + " is too old; "
|
|
+ oldestErrorProneApi + " is the oldest supported version")
|
|
}
|
|
}
|
|
def versions = [
|
|
asm : "7.1",
|
|
checkerFramework : "3.21.1",
|
|
// The version of Error Prone used to check NullAway's code
|
|
errorProne : "2.10.0",
|
|
// The version of Error Prone that NullAway is compiled and tested against
|
|
errorProneApi : project.hasProperty("epApiVersion") ? epApiVersion : oldestErrorProneApi,
|
|
support : "27.1.1",
|
|
wala : "1.5.4",
|
|
commonscli : "1.4",
|
|
autoValue : "1.9",
|
|
autoService : "1.0.1",
|
|
]
|
|
|
|
def apt = [
|
|
autoValue : "com.google.auto.value:auto-value:${versions.autoValue}",
|
|
autoValueAnnot : "com.google.auto.value:auto-value-annotations:${versions.autoValue}",
|
|
autoService : "com.google.auto.service:auto-service:${versions.autoService}",
|
|
autoServiceAnnot : "com.google.auto.service:auto-service-annotations:${versions.autoService}",
|
|
jakartaInject : "jakarta.inject:jakarta.inject-api:2.0.0",
|
|
javaxInject : "javax.inject:javax.inject:1",
|
|
]
|
|
|
|
def build = [
|
|
asm : "org.ow2.asm:asm:${versions.asm}",
|
|
asmTree : "org.ow2.asm:asm-tree:${versions.asm}",
|
|
errorProneCheckApi : "com.google.errorprone:error_prone_check_api:${versions.errorProneApi}",
|
|
errorProneCore : "com.google.errorprone:error_prone_core:${versions.errorProne}",
|
|
errorProneCoreForApi : "com.google.errorprone:error_prone_core:${versions.errorProneApi}",
|
|
errorProneJavac : "com.google.errorprone:javac:9+181-r4173-1",
|
|
errorProneTestHelpers : "com.google.errorprone:error_prone_test_helpers:${versions.errorProneApi}",
|
|
checkerDataflow : "org.checkerframework:dataflow-nullaway:${versions.checkerFramework}",
|
|
guava : "com.google.guava:guava:24.1.1-jre",
|
|
javaxValidation : "javax.validation:validation-api:2.0.1.Final",
|
|
jsr305Annotations : "com.google.code.findbugs:jsr305:3.0.2",
|
|
commonsIO : "commons-io:commons-io:2.4",
|
|
wala : ["com.ibm.wala:com.ibm.wala.util:${versions.wala}",
|
|
"com.ibm.wala:com.ibm.wala.shrike:${versions.wala}",
|
|
"com.ibm.wala:com.ibm.wala.core:${versions.wala}"],
|
|
commonscli : "commons-cli:commons-cli:${versions.commonscli}",
|
|
|
|
// android stuff
|
|
buildToolsVersion: "30.0.3",
|
|
compileSdkVersion: 30,
|
|
ci: "true" == System.getenv("CI"),
|
|
minSdkVersion: 16,
|
|
targetSdkVersion: 30,
|
|
|
|
]
|
|
|
|
def support = [
|
|
appcompat : "com.android.support:appcompat-v7:${versions.support}"
|
|
]
|
|
|
|
def test = [
|
|
junit4 : "junit:junit:4.12",
|
|
junit5Jupiter : ["org.junit.jupiter:junit-jupiter-api:5.0.2","org.apiguardian:apiguardian-api:1.0.0"],
|
|
jetbrainsAnnotations : "org.jetbrains:annotations:13.0",
|
|
inferAnnotations : "com.facebook.infer.annotation:infer-annotation:0.11.0",
|
|
cfQual : "org.checkerframework:checker-qual:${versions.checkerFramework}",
|
|
// 2.5.5 is the last release to contain this artifact
|
|
cfCompatQual : "org.checkerframework:checker-compat-qual:2.5.5",
|
|
rxjava2 : "io.reactivex.rxjava2:rxjava:2.1.2",
|
|
commonsLang3 : "org.apache.commons:commons-lang3:3.8.1",
|
|
commonsLang : "commons-lang:commons-lang:2.6",
|
|
lombok : "org.projectlombok:lombok:1.18.12",
|
|
springBeans : "org.springframework:spring-beans:5.3.7",
|
|
springContext : "org.springframework:spring-context:5.3.7",
|
|
grpcCore : "io.grpc:grpc-core:1.15.1", // Should upgrade, but this matches our guava version
|
|
]
|
|
|
|
ext.deps = [
|
|
"apt": apt,
|
|
"build": build,
|
|
"support": support,
|
|
"test": test,
|
|
"versions": versions
|
|
]
|