You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.2 KiB
78 lines
2.2 KiB
3 years ago
|
/*
|
||
|
* 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.
|
||
|
*/
|
||
3 years ago
|
|
||
|
import com.google.protobuf.gradle.builtins
|
||
|
import com.google.protobuf.gradle.generateProtoTasks
|
||
|
import com.google.protobuf.gradle.protobuf
|
||
|
import com.google.protobuf.gradle.protoc
|
||
|
|
||
3 years ago
|
// TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed
|
||
3 years ago
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||
3 years ago
|
plugins {
|
||
3 years ago
|
id("nowinandroid.android.library")
|
||
|
id("nowinandroid.android.library.jacoco")
|
||
|
kotlin("kapt")
|
||
|
id("dagger.hilt.android.plugin")
|
||
3 years ago
|
alias(libs.plugins.protobuf)
|
||
3 years ago
|
id("nowinandroid.spotless")
|
||
3 years ago
|
}
|
||
|
|
||
3 years ago
|
android {
|
||
|
defaultConfig {
|
||
|
consumerProguardFiles("consumer-proguard-rules.pro")
|
||
|
}
|
||
|
}
|
||
|
|
||
3 years ago
|
// Setup protobuf configuration, generating lite Java and Kotlin classes
|
||
|
protobuf {
|
||
|
protoc {
|
||
3 years ago
|
artifact = libs.protobuf.protoc.get().toString()
|
||
3 years ago
|
}
|
||
|
generateProtoTasks {
|
||
3 years ago
|
all().forEach { task ->
|
||
3 years ago
|
task.builtins {
|
||
3 years ago
|
val java by registering {
|
||
|
option("lite")
|
||
3 years ago
|
}
|
||
3 years ago
|
val kotlin by registering {
|
||
|
option("lite")
|
||
3 years ago
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
2 years ago
|
implementation(project(":core:common"))
|
||
|
implementation(project(":core:model"))
|
||
3 years ago
|
|
||
2 years ago
|
testImplementation(project(":core:testing"))
|
||
3 years ago
|
|
||
3 years ago
|
implementation(libs.kotlinx.coroutines.android)
|
||
3 years ago
|
|
||
3 years ago
|
implementation(libs.androidx.dataStore.core)
|
||
3 years ago
|
implementation(libs.protobuf.kotlin.lite)
|
||
3 years ago
|
|
||
3 years ago
|
implementation(libs.hilt.android)
|
||
|
kapt(libs.hilt.compiler)
|
||
|
kaptAndroidTest(libs.hilt.compiler)
|
||
3 years ago
|
}
|
||
2 years ago
|
|
||
2 years ago
|
// TODO b/239411851, Remove kapt workaround configuration
|
||
2 years ago
|
kapt {
|
||
|
correctErrorTypes = true
|
||
|
}
|