1/*
2 * Copyright (C) 2022 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
17/**
18 * This file was created using the `create_project.py` script located in the
19 * `<AndroidX root>/development/project-creator` directory.
20 *
21 * Please use that script when creating a new project, rather than copying an existing project and
22 * modifying its settings.
23 */
24
25import androidx.build.SoftwareType
26import androidx.build.PlatformIdentifier
27
28plugins {
29    id("AndroidXPlugin")
30}
31
32androidXMultiplatform {
33    androidLibrary {
34        namespace = "androidx.graphics.shapes"
35        withAndroidTestOnDeviceBuilder {
36            it.compilationName = "instrumentedTest"
37            it.defaultSourceSetName = "androidInstrumentedTest"
38            it.sourceSetTreeName = "test"
39        }
40        withAndroidTestOnJvmBuilder {
41            it.defaultSourceSetName = "androidUnitTest"
42        }
43    }
44    desktop()
45    linux()
46    ios()
47    watchos()
48    tvos()
49    mac()
50
51    defaultPlatform(PlatformIdentifier.ANDROID)
52
53    sourceSets {
54        commonMain {
55            dependencies {
56                implementation(libs.kotlinStdlib)
57                implementation("androidx.collection:collection:1.4.5")
58                implementation("androidx.annotation:annotation:1.9.1")
59            }
60        }
61
62        commonTest {
63            dependencies {
64            }
65        }
66
67        jvmMain {
68            dependsOn(commonMain)
69            dependencies {
70            }
71        }
72
73        androidMain {
74            dependsOn(jvmMain)
75            dependencies {
76                implementation("androidx.core:core-ktx:1.10.0")
77                implementation("androidx.annotation:annotation-experimental:1.4.1")
78            }
79        }
80
81        desktopMain {
82            dependsOn(jvmMain)
83        }
84
85        nativeMain {
86            dependsOn(commonMain)
87        }
88
89        androidInstrumentedTest {
90            dependsOn(commonTest)
91            dependencies {
92                implementation(libs.testRules)
93                implementation(libs.testRunner)
94                implementation(libs.junit)
95                implementation(libs.truth)
96                implementation(libs.dexmakerMockitoInlineExtended)
97                implementation(libs.mockitoKotlin)
98            }
99        }
100
101        targets.configureEach { target ->
102            if (target.platformType == org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType.native) {
103                target.compilations["main"].defaultSourceSet {
104                    dependsOn(nativeMain)
105                }
106            }
107        }
108    }
109
110    enableBinaryCompatibilityValidator = false
111}
112
113
114androidx {
115    name = "Graphics Shapes"
116    type = SoftwareType.PUBLISHED_LIBRARY
117    mavenVersion = LibraryVersions.GRAPHICS_SHAPES
118    inceptionYear = "2022"
119    description = "create and render rounded polygonal shapes"
120    legacyDisableKotlinStrictApiMode = true
121}
122