Sduduzog před 6 roky
rodič
revize
ca704199f3
2 změnil soubory, kde provedl 19 přidání a 4 odebrání
  1. 3 0
      .circleci/config.yml
  2. 16 4
      app/build.gradle

+ 3 - 0
.circleci/config.yml

@@ -39,4 +39,7 @@ jobs:
           destination: reports
       - store_test_results:
           path: app/build/test-results
+      - run:
+          name: Upload to Google Play
+          command: ./gradlew publishRelease
 # See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples

+ 16 - 4
app/build.gradle

@@ -1,10 +1,14 @@
-apply plugin: 'com.android.application'
+plugins{
+    id 'com.android.application'
 
-apply plugin: 'kotlin-android'
+    id'kotlin-android'
 
-apply plugin: 'kotlin-android-extensions'
+    id 'kotlin-android-extensions'
 
-apply plugin: 'kotlin-kapt'
+    id 'kotlin-kapt'
+
+    id 'com.github.triplet.play' version '2.0.0'
+}
 
 android {
     compileSdkVersion 29
@@ -81,3 +85,11 @@ dependencies {
     androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
 
 }
+
+// Configuration for com.github.triplet.play deployment
+play {
+    track = 'beta' // or alpha or beta...
+    serviceAccountCredentials = file(System.getenv("PRIVATE_KEY") ?: "private_key.json")
+    defaultToAppBundles = true // Use App Bundle instead of APK
+    resolutionStrategy = "ignore" //If the deployment fails due to an API error, don't fail the CI Build
+}