blob: 1cf5db4a6420bf96a205a677dfd5aa277923d972 [file] [log] [blame]
Yigit Boyar19b41102016-11-20 10:46:32 -08001/*
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 Songee0da742024-01-03 14:08:46 -080017/**
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 Rivera6e1e6e12024-12-16 22:13:20 -050024
25import androidx.build.KotlinTarget
elifbilginb93b6042023-08-02 08:14:41 -070026import androidx.build.LibraryType
27import androidx.build.PlatformIdentifier
Daniel Santiago Rivera19309782024-07-04 10:51:06 -040028import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
Yigit Boyar19b41102016-11-20 10:46:32 -080029
Aurimas Liutikasf8b708a2017-11-02 16:07:13 -070030plugins {
Aurimas Liutikas2cc275f2019-04-04 19:33:53 +010031 id("AndroidXPlugin")
Aurimas Liutikasf8b708a2017-11-02 16:07:13 -070032}
Yigit Boyar19b41102016-11-20 10:46:32 -080033
elifbilginb93b6042023-08-02 08:14:41 -070034androidXMultiplatform {
35 jvm() {
36 withJava()
37 }
38 mac()
39 linux()
40 ios()
41
42 defaultPlatform(PlatformIdentifier.JVM)
43
44 sourceSets {
elifbilginb93b6042023-08-02 08:14:41 -070045 commonMain {
46 dependencies {
47 api(libs.kotlinStdlib)
Daniel Santiago Riverac8e733d2024-07-30 12:31:12 -040048 api("androidx.annotation:annotation:1.8.1")
elifbilginb93b6042023-08-02 08:14:41 -070049 }
50 }
elifbilgin00ff4732023-09-21 18:04:04 -070051
elifbilginb93b6042023-08-02 08:14:41 -070052 commonTest {
53 dependencies {
54 implementation(project(":kruth:kruth"))
elifbilgin00ff4732023-09-21 18:04:04 -070055 implementation(libs.kotlinTest)
56 }
57 }
58
59 jvmMain {
60 dependsOn(commonMain)
61 }
62
63 jvmTest {
64 dependsOn(commonTest)
65 dependencies {
elifbilginb93b6042023-08-02 08:14:41 -070066 implementation(libs.guava)
elifbilgin00ff4732023-09-21 18:04:04 -070067 implementation(libs.kotlinTestJunit)
elifbilginb93b6042023-08-02 08:14:41 -070068 }
69 }
Daniel Santiago Rivera19309782024-07-04 10:51:06 -040070
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 }
elifbilginb93b6042023-08-02 08:14:41 -070082 }
Yigit Boyar19b41102016-11-20 10:46:32 -080083}
84
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070085androidx {
Alan Viverettec9e1fd72023-05-08 17:36:59 -040086 name = "Room-Common"
elifbilginb93b6042023-08-02 08:14:41 -070087 type = LibraryType.PUBLISHED_LIBRARY
Aurimas Liutikasea5ee822017-11-06 12:52:28 -080088 inceptionYear = "2017"
89 description = "Android Room-Common"
elifbilginb93b6042023-08-02 08:14:41 -070090 legacyDisableKotlinStrictApiMode = true
Daniel Santiago Rivera6e1e6e12024-12-16 22:13:20 -050091 kotlinTarget = KotlinTarget.KOTLIN_2_0
Alex Saveaub50d5002020-07-14 05:25:54 +000092}