Skip to content

Commit a30e493

Browse files
committed
build: revert gradle changes to address deprecation warnings for Gradle 9
causing a weird property-named directory to be created in model/ Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 58edb20 commit a30e493

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ buildscript {
1717
classpath(Classpath.firebase_perf)
1818
classpath(Classpath.secrets_gradle_plugin)
1919
classpath(Classpath.kotlin_serialization_plugin)
20-
classpath("com.google.protobuf:protobuf-gradle-plugin:0.8.14")
20+
classpath(Classpath.protobuf_plugin)
2121
}
2222
}
2323

buildSrc/src/main/java/Dependencies.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ object Versions {
7070
const val markwon = "4.6.2"
7171
const val timber = "5.0.1"
7272
const val voyager = "1.0.0"
73+
const val protobuf_plugin = "0.8.14"
7374
}
7475

7576
object Classpath {
@@ -79,6 +80,7 @@ object Classpath {
7980
const val kotlin_gradle_plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
8081
const val kotlin_serialization_plugin = "org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlin}"
8182
const val google_services = "com.google.gms:google-services:${Versions.google_services}"
83+
const val protobuf_plugin = "com.google.protobuf:protobuf-gradle-plugin:${Versions.protobuf_plugin}"
8284

8385
const val crashlytics_gradle = "com.google.firebase:firebase-crashlytics-gradle:${Versions.crashlytics_gradle}"
8486
const val bugsnag = "com.bugsnag:bugsnag-android-gradle-plugin:8.+"

model/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ dependencies {
2828

2929
}
3030

31-
def generatedSrcRoot = file("${layout.buildDirectory}/generated/source/proto/main/java")
32-
def generatedSrcRoot2 = file("${layout.buildDirectory}/generated/source/proto/main/grpc")
33-
def generatedSrcRoot3 = file("${layout.buildDirectory}/generated/source/proto/main/grpcKt")
31+
def generatedSrcRoot = file("${buildDir}/generated/source/proto/main/java")
32+
def generatedSrcRoot2 = file("${buildDir}/generated/source/proto/main/grpc")
33+
def generatedSrcRoot3 = file("${buildDir}/generated/source/proto/main/grpcKt")
3434
sourceSets.main {
3535
proto {
3636
srcDir "${rootDir}/model/proto"
@@ -41,7 +41,7 @@ sourceSets.main {
4141
}
4242

4343
compileJava {
44-
options.generatedSourceOutputDirectory.set(generatedSrcRoot)
44+
options.annotationProcessorGeneratedSourcesDirectory generatedSrcRoot
4545
}
4646

4747
protobuf {
@@ -87,7 +87,7 @@ jar {
8787
exclude "**/*agora*/**"
8888
}
8989

90-
tasks.register('sourcesJar', Jar) {
90+
task sourcesJar(type: Jar) {
9191
from sourceSets.main.allSource
9292
archiveClassifier = 'sources'
9393
from generatedSrcRoot, generatedSrcRoot2, generatedSrcRoot3

0 commit comments

Comments
 (0)