1/* 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 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 */ 24import org.jetbrains.kotlin.gradle.tasks.KotlinCompile 25 26plugins { 27 id("AndroidXPlugin") 28 id("com.android.application") 29 id("AndroidXComposePlugin") 30 id("org.jetbrains.kotlin.android") 31 id("com.google.protobuf") 32 alias(libs.plugins.kotlinSerialization) 33} 34 35dependencies { 36 compileOnly(project(":datastore:datastore-preferences-external-protobuf")) 37 38 implementation(libs.protobufLite) 39 implementation(libs.kotlinStdlib) 40 implementation("androidx.core:core-ktx:1.7.0") 41 implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.1") 42 implementation("androidx.activity:activity-compose:1.3.1") 43 implementation(project(":compose:ui:ui")) 44 implementation(project(":compose:ui:ui-tooling-preview")) 45 implementation(project(":compose:material:material")) 46 testImplementation("junit:junit:4.13.2") 47 debugImplementation(project(":compose:ui:ui-tooling")) 48 debugImplementation(project(":compose:ui:ui-test-manifest")) 49 50 implementation("androidx.datastore:datastore-preferences:1.0.0") 51 implementation("com.google.protobuf:protobuf-javalite:3.19.4") 52 53 // For kotlin serialization 54 implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1") 55} 56android { 57 compileSdk = 35 58 namespace = "com.example.datastorecomposesamples" 59 defaultConfig { 60 minSdk = 28 61 } 62} 63