1/* 2 * Copyright (C) 2024 The Android Open Source Project 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 17import androidx.build.SoftwareType 18import androidx.build.PlatformIdentifier 19 20plugins { 21 id("AndroidXPlugin") 22 id("com.android.library") 23} 24 25androidXMultiplatform { 26 jvm() 27 androidTarget() 28 29 defaultPlatform(PlatformIdentifier.JVM) 30 31 sourceSets { 32 commonMain { 33 dependencies { 34 api(libs.kotlinStdlib) 35 36 implementation("androidx.annotation:annotation:1.8.0") 37 } 38 } 39 40 jvmAndroidMain { 41 dependsOn(commonMain) 42 dependencies { 43 implementation(project(":ink:ink-nativeloader")) 44 } 45 } 46 47 jvmAndroidTest { 48 dependsOn(commonTest) 49 dependencies { 50 implementation(libs.junit) 51 implementation(libs.kotlinTest) 52 implementation(libs.truth) 53 implementation(project(":ink:ink-brush")) 54 implementation(project(":ink:ink-strokes")) 55 } 56 } 57 58 jvmMain { 59 dependsOn(jvmAndroidMain) 60 } 61 62 jvmTest { 63 // TODO: b/362697089 - add `dependsOn(jvmAndroidTest)` to run the tests 64 // in a JVM environment in addition to on Android emulators, once the 65 // mysterious SIGSEGV is resolved. 66 } 67 68 androidMain { 69 dependsOn(jvmAndroidMain) 70 } 71 72 androidInstrumentedTest { 73 dependsOn(jvmAndroidTest) 74 dependencies { 75 implementation(libs.testExtJunit) 76 implementation(libs.testRules) 77 implementation(libs.testRunner) 78 implementation(libs.espressoCore) 79 implementation(libs.junit) 80 implementation(libs.truth) 81 implementation("androidx.graphics:graphics-path:1.0.1") 82 } 83 } 84 } 85} 86 87android { 88 namespace = "androidx.ink.geometry" 89} 90 91androidx { 92 name = "Ink Geometry" 93 type = SoftwareType.PUBLISHED_LIBRARY 94 inceptionYear = "2024" 95 description = "Create beautiful strokes" 96} 97