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 19import androidx.build.AndroidXConfig 20 21plugins { 22 id("AndroidXPlugin") 23 id("com.android.library") 24} 25 26androidXMultiplatform { 27 jvm() 28 androidTarget() 29 30 defaultPlatform(PlatformIdentifier.JVM) 31 32 sourceSets { 33 commonMain { 34 dependencies { 35 api(libs.kotlinStdlib) 36 37 implementation("androidx.annotation:annotation:1.8.0") 38 } 39 } 40 41 jvmMain { 42 dependsOn(commonMain) 43 resources.srcDir(new File( 44 AndroidXConfig.getPrebuiltsRoot(project), 45 "androidx/ink/jvm")) 46 } 47 48 androidMain { 49 dependsOn(commonMain) 50 } 51 } 52} 53 54android { 55 namespace = "androidx.ink.nativeloader" 56 sourceSets { 57 main.jniLibs.srcDirs += new File( 58 AndroidXConfig.getPrebuiltsRoot(project), 59 "androidx/ink/android") 60 } 61 defaultConfig { 62 consumerProguardFiles('used_by_native.pgcfg', 'external_referenced_by_native.pgcfg') 63 } 64} 65 66androidx { 67 name = "Ink Native Loader" 68 type = SoftwareType.PUBLISHED_LIBRARY 69 inceptionYear = "2024" 70 description = "Native dependencies for Ink" 71} 72