diff --git a/core/database/build.gradle.dcl b/core/database/build.gradle.dcl new file mode 100644 index 0000000000..a6db38ed03 --- /dev/null +++ b/core/database/build.gradle.dcl @@ -0,0 +1,21 @@ +androidLibrary { + namespace = "com.google.samples.apps.nowinandroid.core.database" + + dependencies { + api(project(":core:model")) + + implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0") + } + + room {} + hilt {} + + testing { + dependencies { + androidImplementation(project(":core:testing")) + } + + jacoco {} + } +} + diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts deleted file mode 100644 index 4a6bcb66af..0000000000 --- a/core/database/build.gradle.kts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - alias(libs.plugins.nowinandroid.android.library) - alias(libs.plugins.nowinandroid.android.library.jacoco) - alias(libs.plugins.nowinandroid.android.hilt) - alias(libs.plugins.nowinandroid.android.room) -} - -android { - defaultConfig { - testInstrumentationRunner = - "com.google.samples.apps.nowinandroid.core.testing.NiaTestRunner" - } - namespace = "com.google.samples.apps.nowinandroid.core.database" -} - -dependencies { - api(projects.core.model) - - implementation(libs.kotlinx.datetime) - - androidTestImplementation(projects.core.testing) -} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 038f50f16b..87cae386ea 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -167,7 +167,7 @@ ksp = { id = "com.google.devtools.ksp" } module-graph = { id = "com.jraska.module.graph.assertion", version.ref = "moduleGraph" } protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" } roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" } -room = { id = "androidx.room", version.ref = "room" } +room = { id = "androidx.room" } secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" } # Plugins defined by this project diff --git a/settings.gradle.dcl b/settings.gradle.dcl index ef20cc7ffc..be1cf241b0 100644 --- a/settings.gradle.dcl +++ b/settings.gradle.dcl @@ -51,10 +51,19 @@ conventions { jsonEnabled = true } + room { + // TODO: This convention path should ideally be EXPLICITLY relative to the current project's dir (i.e. ${projectDir}/schemas) + schemaDirectory = "schemas" + } + testing { jacoco { version = "0.8.7" } + + testOptions { + testInstrumentationRunner = "com.google.samples.apps.nowinandroid.core.testing.NiaTestRunner" + } } } }