1/* 2 * Copyright (C) 2021. Uber Technologies 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16plugins { 17 id "java-library" 18 id 'nullaway.java-test-conventions' 19} 20 21// JarInfer requires JDK 11+, due to its dependence on WALA 22tasks.withType(JavaCompile) { 23 java.sourceCompatibility = JavaVersion.VERSION_11 24 java.targetCompatibility = JavaVersion.VERSION_11 25} 26 27repositories { 28 mavenCentral() 29 // uncomment if you want to use wala.dalvik or wala.scandroid 30 //maven { url "https://raw.github.com/msridhar/maven-jars/mvn-repo/" } 31} 32 33dependencies { 34 api deps.build.asm 35 api deps.build.asmTree 36 api deps.build.wala 37 api deps.build.guava 38 api deps.build.commonsIO 39 compileOnly deps.build.errorProneCheckApi 40 41 testImplementation deps.test.junit4 42 testImplementation(deps.build.errorProneTestHelpers) { 43 exclude group: "junit", module: "junit" 44 } 45 testImplementation project(":jar-infer:test-java-lib-jarinfer") 46 testImplementation files("${System.properties['java.home']}/../lib/tools.jar") // is there a better way? 47 testRuntimeOnly deps.build.errorProneCheckApi 48} 49 50test { 51 dependsOn ':jar-infer:test-android-lib-jarinfer:bundleReleaseAar' 52} 53 54tasks.withType(JavaCompile).configureEach { 55 options.compilerArgs += "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED" 56} 57 58apply plugin: 'com.vanniktech.maven.publish' 59