1/* 2 * Copyright (C) 2025 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 } 37 38 jvmAndroidMain { 39 dependsOn(commonMain) 40 dependencies { 41 implementation(project(":ink:ink-brush")) 42 implementation(project(":ink:ink-strokes")) 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 dependsOn(jvmAndroidTest) 64 } 65 66 androidMain { 67 dependsOn(jvmAndroidMain) 68 dependencies { 69 implementation(project(":ink:ink-rendering")) 70 } 71 } 72 73 androidInstrumentedTest { 74 // JVM tests use java.util.Base64 API which is only available on 75 // Android API 26+, so just run those tests in the JVM environment. 76 // dependsOn(jvmAndroidTest) 77 dependencies { 78 implementation(libs.testExtJunit) 79 implementation(libs.testRules) 80 implementation(libs.testRunner) 81 implementation(libs.espressoCore) 82 implementation(libs.junit) 83 implementation(libs.kotlinTest) 84 implementation(libs.truth) 85 } 86 } 87 } 88} 89 90android { 91 namespace = "androidx.ink.storage" 92 compileSdk = 35 93} 94 95androidx { 96 name = "Ink Storage" 97 type = SoftwareType.PUBLISHED_LIBRARY 98 inceptionYear = "2025" 99 description = "Efficiently store and retrieve Ink strokes" 100} 101