blob: 2e5f73699c233c41f497caf6c8414f1145a73c33 [file] [log] [blame]
/*
* Copyright 2020 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
*
* http://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.
*/
/**
* This file was created using the `create_project.py` script located in the
* `<AndroidX root>/development/project-creator` directory.
*
* Please use that script when creating a new project, rather than copying an existing project and
* modifying its settings.
*/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("AndroidXPlugin")
id("com.android.application")
id("AndroidXComposePlugin")
id("org.jetbrains.kotlin.android")
id("com.google.protobuf")
alias(libs.plugins.kotlinSerialization)
}
dependencies {
compileOnly(projectOrArtifact(":datastore:datastore-preferences-external-protobuf"))
implementation(libs.protobufLite)
implementation(libs.kotlinStdlib)
implementation('androidx.core:core-ktx:1.7.0')
implementation('androidx.lifecycle:lifecycle-runtime-ktx:2.3.1')
implementation('androidx.activity:activity-compose:1.3.1')
implementation(projectOrArtifact(":compose:ui:ui"))
implementation(projectOrArtifact(":compose:ui:ui-tooling-preview"))
implementation(projectOrArtifact(":compose:material:material"))
testImplementation('junit:junit:4.13.2')
debugImplementation(projectOrArtifact(":compose:ui:ui-tooling"))
debugImplementation(projectOrArtifact(":compose:ui:ui-test-manifest"))
implementation("androidx.datastore:datastore-preferences:1.0.0")
implementation("com.google.protobuf:protobuf-javalite:3.19.4")
// For kotlin serialization
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1")
}
android {
namespace 'com.example.datastorecomposesamples'
defaultConfig {
minSdk 28
}
}
protobuf {
protoc {
artifact = libs.protobufCompiler.get()
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option 'lite'
}
}
}
}
}