Closed crysxd closed 3 years ago
Use GPP 3.5.0-agp7.0.
Maybe this helps:
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'com.google.firebase.crashlytics'
id 'com.github.triplet.play'
}
import com.github.triplet.gradle.androidpublisher.*
android {
compileSdk 30
defaultConfig {
applicationId "de.crysxd.octocam"
minSdk 21
targetSdk 30
versionCode 1_00_00
versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
signingConfigs {
release {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
storeFile file("key.keystore")
storePassword properties.getProperty('signing.storePassword')
keyAlias properties.getProperty('signing.storeAlias')
keyPassword properties.getProperty('signing.keyPassword')
}
}
buildTypes {
debug {
manifestPlaceholders = [firebaseRemoteServicesEnabled: "false"]
}
release {
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders = [firebaseRemoteServicesEnabled: "true"]
}
}
buildFeatures {
viewBinding true
compose true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
useIR = true
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
}
}
play {
serviceAccountCredentials.set(file("service-account.json"))
track.set("production")
defaultToAppBundles.set(true)
resolutionStrategy.set(ResolutionStrategy.IGNORE)
releaseStatus.set(ReleaseStatus.COMPLETED)
updatePriority.set(2)
userFraction.set(1d)
}
dependencies {
// Core
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
implementation 'com.jakewharton.timber:timber:4.7.1'
// UI
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
// Serialization
implementation 'com.squareup.moshi:moshi-kotlin:1.12.0'
// Compose
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.activity:activity-compose:1.3.0'
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
// Lifecycle
implementation 'androidx.lifecycle:lifecycle-service:2.3.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
// mDNS
implementation 'com.github.andriydruk:dnssd:0.9.15'
// Markdown
final def markwon_version = '4.6.2'
implementation "io.noties.markwon:core:$markwon_version"
implementation "io.noties.markwon:image:$markwon_version"
implementation "io.noties.markwon:linkify:$markwon_version"
// CameraX
def camerax_version = "1.0.1"
implementation "androidx.camera:camera-camera2:$camerax_version"
implementation "androidx.camera:camera-lifecycle:$camerax_version"
implementation "androidx.camera:camera-view:1.0.0-alpha27"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
// Firebase
implementation platform('com.google.firebase:firebase-bom:26.5.0')
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-config-ktx'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-messaging'
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
compose_version = '1.0.0'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10"
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
classpath 'com.github.triplet.gradle:play-publisher:3.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Right, it should be classpath 'com.github.triplet.gradle:play-publisher:3.5.0-agp7.0'
.
Yeah, that seems to have done the trick! 👍 I can't find any instructions in the readme for this, maybe a good idea to add it there?
Thank you very much for your help and this great tool, will buy you a coffee! 😇
@SUPERCILEX lemme know if you want me to file another issue, but I'm seeing this same thing on 3.6.0
-- https://scans.gradle.com/s/jczyg6pi6pasq/failure#1
Ah apologies, I've definitely updated but I blame Gradle on my CI box; thanks for reading better than I can 🤦🏾
All good :)
Describe the bug
I'm trying to setup GPP 3.5.0 with a new project using AGP 7.0.0. I get following error:
Using AGP 4.2.2 can configure the project, but the build fails later because I need 7.0.0 for Compose.
How To Reproduce
Versions
Tasks executed
./gradlew publishReleaseBundle
.Expected behavior
Builds :)
Additional context (if a crash, provide stack trace)