1 /* 2 * Copyright 2023 Google LLC 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 */ 16 <lambda>null17plugins { 18 `java-library` 19 } 20 <lambda>null21repositories { 22 mavenCentral() 23 google() 24 } 25 <lambda>null26dependencies { 27 implementation("androidx.annotation:annotation:1.6.0") 28 29 // JUnit Test Support 30 testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1") 31 testImplementation("com.google.truth:truth:1.1.4") 32 testImplementation("org.mockito:mockito-core:5.+") 33 testImplementation("org.mockito:mockito-junit-jupiter:5.+") 34 testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1") 35 } 36 37 // Flattened directory layout <lambda>null38sourceSets { 39 main { 40 java { 41 setSrcDirs(listOf("java")) 42 } 43 } 44 test { 45 java { 46 setSrcDirs(listOf("test")) 47 } 48 } 49 } 50 <lambda>null51tasks.test { 52 useJUnitPlatform() 53 jvmArgs = mutableListOf("-Djava.library.path=$projectDir/../../target/debug") 54 } 55