Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove protobuf support #5

Merged
merged 1 commit into from
May 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 0 additions & 30 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import com.google.protobuf.gradle.generateProtoTasks
import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.protobuf
import com.google.protobuf.gradle.protoc

plugins {
id("com.android.application")
kotlin("android")
kotlin("kapt")
id("com.google.protobuf")
id("dagger.hilt.android.plugin")
// Firebase
id("com.google.gms.google-services")
Expand Down Expand Up @@ -110,31 +104,7 @@ dependencies {
dataStore()
accompanist()
retrofit()
protobuf()

thirdPartyLibs()
testLibs()
}

protobuf {
protoc {
artifact = if (project.osdetector.arch == "aarch_64") {
"${Libs.protobufCompiler}:${project.osdetector.os}-${project.osdetector.arch}"
} else {
Libs.protobufCompiler
}
}

generateProtoTasks {
all().forEach {
it.plugins {
id("java") {
option("lite")
}
}
// it.builtins {
// id("kotlin")
// }
}
}
}
6 changes: 0 additions & 6 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,3 @@
}
# --------------- End: Retrofit ---------------


# --------------- Begin: Datastore ---------------
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
<fields>;
}
# --------------- End: Datastore ---------------
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ buildscript {
classpath(Libs.buildToolsCrashlyticsGradle)

classpath(Libs.buildToolsHiltAndroidGradlePlugin)
classpath(Libs.buildToolsProtobufGradlePlugin)

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
9 changes: 0 additions & 9 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ object Libs {
const val buildToolsGoogleServices = "com.google.gms:google-services:${Versions.GOOGLE_SERVICES}"
const val buildToolsCrashlyticsGradle = "com.google.firebase:firebase-crashlytics-gradle:${Versions.CRASHLYTICS_GRADLE}"
const val buildToolsHiltAndroidGradlePlugin = "com.google.dagger:hilt-android-gradle-plugin:${Versions.HILT}"
const val buildToolsProtobufGradlePlugin = "com.google.protobuf:protobuf-gradle-plugin:${Versions.PROTOBUF_GRADLE}"

const val protobufCompiler = "com.google.protobuf:protoc:${Versions.PROTOBUF_COMPILER}"

const val coreKtx = "androidx.core:core-ktx:${Versions.KOTLIN_CORE_KTX}"
const val kotlinxDateTime = "org.jetbrains.kotlinx:kotlinx-datetime:${Versions.KOTLINX_DATETIME}"

const val googleMaterial = "com.google.android.material:material:${Versions.GOOGLE_MATERIAL}"
const val googleProtobufJavalite = "com.google.protobuf:protobuf-javalite:${Versions.GOOGLE_PROTOBUF_JAVALITE}"
const val googleProtobufKotlinLite = "com.google.protobuf:protobuf-kotlin-lite:${Versions.GOOGLE_PROTOBUF_KOTLIN_LITE}"
const val googlePlayCoreKtx = "com.google.android.play:core-ktx:${Versions.GOOGLE_PLAY_CORE_KTX}"
const val paletteKtx = "androidx.palette:palette-ktx:${Versions.PALETTE_KTX}"

Expand Down Expand Up @@ -134,10 +129,6 @@ fun DependencyHandler.retrofit() {
implementation(Libs.retrofitGsonConverter)
}

fun DependencyHandler.protobuf() {
implementation(Libs.googleProtobufJavalite)
}

fun DependencyHandler.thirdPartyLibs() {
implementation(Libs.thirdSunCalc)
}
Expand Down
4 changes: 0 additions & 4 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ object Versions {

const val GOOGLE_SERVICES = "4.3.5"
const val CRASHLYTICS_GRADLE = "2.8.1"
const val PROTOBUF_GRADLE = "0.8.18"
const val PROTOBUF_COMPILER = "4.0.0-rc-2"

const val KOTLIN_CORE_KTX = "1.8.0-alpha07"
const val KOTLINX_DATETIME = "0.3.2"

const val GOOGLE_MATERIAL = "1.7.0-alpha01"
const val GOOGLE_PROTOBUF_JAVALITE = "4.0.0-rc-2"
const val GOOGLE_PROTOBUF_KOTLIN_LITE = "3.19.3"
const val GOOGLE_PLAY_CORE_KTX = "1.8.1"
const val PALETTE_KTX = "1.0.0"

Expand Down