[go: nahoru, domu]

blob: 9a4b7c10ec8ee626ce4e3f036042d41f3f78771f [file] [log] [blame]
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -07001/*
2 * Copyright 2020 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 */
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070024import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070025
26plugins {
27 id("AndroidXPlugin")
Jim Sproch9e38b4f2021-01-06 14:21:06 -080028 id("com.android.application")
Ian Lakebc09a552020-08-28 17:30:15 -070029 id("org.jetbrains.kotlin.android")
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070030 id("com.google.protobuf")
Aurimas Liutikas8c324572022-03-10 13:22:00 -080031 alias(libs.plugins.kotlinSerialization)
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070032}
33
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070034dependencies {
Rohit Sathyanarayanab18c8602020-07-27 12:14:25 -070035 // For DataStore with Preferences
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070036 implementation(project(":datastore:datastore-preferences"))
37
38 // For DataStore with protos
rohitsat13c9bbc6f2020-09-29 09:36:28 -070039 implementation(project(":datastore:datastore"))
rohitsat13145577b2020-08-20 13:28:44 -070040
Rohit Sathyanarayanab18c8602020-07-27 12:14:25 -070041
Aurimas Liutikaseba77aa2021-06-04 14:11:01 -070042 implementation(libs.protobufLite)
43 implementation(libs.kotlinStdlib)
rohitsat13145577b2020-08-20 13:28:44 -070044 implementation("androidx.appcompat:appcompat:1.2.0")
Clara Fokde8ee002022-11-16 16:40:33 -080045 implementation("androidx.activity:activity-ktx:1.5.0")
rohitsat132a8e7b02021-01-15 12:22:23 -080046
47 // For settings fragment
48 implementation("androidx.preference:preference:1.1.1")
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070049
Aurimas Liutikasb3483fd2021-06-04 16:56:37 -070050 implementation(libs.constraintLayout)
rohitsat132a8e7b02021-01-15 12:22:23 -080051 implementation("androidx.navigation:navigation-fragment-ktx:2.3.2")
52
53 // For kotlin serialization
54 implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1")
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070055}
56
57protobuf {
58 protoc {
Aurimas Liutikasef122cd2021-10-28 08:37:38 -070059 artifact = libs.protobufCompiler.get()
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070060 }
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070061 generateProtoTasks {
62 all().each { task ->
63 task.builtins {
64 java {
Jim Sproch9e38b4f2021-01-06 14:21:06 -080065 option "lite"
Rohit Sathyanarayana8daa17a2020-05-29 15:51:47 -070066 }
67 }
68 }
69 }
70}
71
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070072android {
73 namespace "com.example.datastoresampleapp"
74}
Jeff Gaston8ee2f6e2022-11-30 13:24:25 -050075