Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 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 | |
Tiem Song | ee0da74 | 2024-01-03 14:08:46 -0800 | [diff] [blame] | 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 | */ |
Daniel Santiago Rivera | 6e1e6e1 | 2024-12-16 22:13:20 -0500 | [diff] [blame] | 24 | |
| 25 | import androidx.build.KotlinTarget |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 26 | import androidx.build.LibraryType |
| 27 | import androidx.build.PlatformIdentifier |
Daniel Santiago Rivera | 1930978 | 2024-07-04 10:51:06 -0400 | [diff] [blame] | 28 | import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 29 | |
Aurimas Liutikas | f8b708a | 2017-11-02 16:07:13 -0700 | [diff] [blame] | 30 | plugins { |
Aurimas Liutikas | 2cc275f | 2019-04-04 19:33:53 +0100 | [diff] [blame] | 31 | id("AndroidXPlugin") |
Aurimas Liutikas | f8b708a | 2017-11-02 16:07:13 -0700 | [diff] [blame] | 32 | } |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 33 | |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 34 | androidXMultiplatform { |
| 35 | jvm() { |
| 36 | withJava() |
| 37 | } |
| 38 | mac() |
| 39 | linux() |
| 40 | ios() |
| 41 | |
| 42 | defaultPlatform(PlatformIdentifier.JVM) |
| 43 | |
| 44 | sourceSets { |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 45 | commonMain { |
| 46 | dependencies { |
| 47 | api(libs.kotlinStdlib) |
Daniel Santiago Rivera | c8e733d | 2024-07-30 12:31:12 -0400 | [diff] [blame] | 48 | api("androidx.annotation:annotation:1.8.1") |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 49 | } |
| 50 | } |
elifbilgin | 00ff473 | 2023-09-21 18:04:04 -0700 | [diff] [blame] | 51 | |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 52 | commonTest { |
| 53 | dependencies { |
| 54 | implementation(project(":kruth:kruth")) |
elifbilgin | 00ff473 | 2023-09-21 18:04:04 -0700 | [diff] [blame] | 55 | implementation(libs.kotlinTest) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | jvmMain { |
| 60 | dependsOn(commonMain) |
| 61 | } |
| 62 | |
| 63 | jvmTest { |
| 64 | dependsOn(commonTest) |
| 65 | dependencies { |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 66 | implementation(libs.guava) |
elifbilgin | 00ff473 | 2023-09-21 18:04:04 -0700 | [diff] [blame] | 67 | implementation(libs.kotlinTestJunit) |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 68 | } |
| 69 | } |
Daniel Santiago Rivera | 1930978 | 2024-07-04 10:51:06 -0400 | [diff] [blame] | 70 | |
| 71 | nativeMain { |
| 72 | dependsOn(commonMain) |
| 73 | } |
| 74 | |
| 75 | targets.configureEach { target -> |
| 76 | if (target.platformType == KotlinPlatformType.native) { |
| 77 | target.compilations["main"].defaultSourceSet { |
| 78 | dependsOn(nativeMain) |
| 79 | } |
| 80 | } |
| 81 | } |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 82 | } |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 83 | } |
| 84 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame] | 85 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 86 | name = "Room-Common" |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 87 | type = LibraryType.PUBLISHED_LIBRARY |
Aurimas Liutikas | ea5ee82 | 2017-11-06 12:52:28 -0800 | [diff] [blame] | 88 | inceptionYear = "2017" |
| 89 | description = "Android Room-Common" |
elifbilgin | b93b604 | 2023-08-02 08:14:41 -0700 | [diff] [blame] | 90 | legacyDisableKotlinStrictApiMode = true |
Daniel Santiago Rivera | 6e1e6e1 | 2024-12-16 22:13:20 -0500 | [diff] [blame] | 91 | kotlinTarget = KotlinTarget.KOTLIN_2_0 |
Alex Saveau | b50d500 | 2020-07-14 05:25:54 +0000 | [diff] [blame] | 92 | } |