[go: nahoru, domu]

blob: f00695a9a241f53b34919ba1518c6e91a512d22b [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.
*/
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 {
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 = "com.google.protobuf:protoc:3.19.4"
}
// Generates the java Protobuf-lite code for the Protobufs in this project. See
// https://github.com/google/protobuf-gradle-plugin#customizing-protobuf-compilation
// for more informatio
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option 'lite'
}
}
}
}
}