From bfe358e5fb110b073aa922672f9e9372109373da Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Ceinos Date: Thu, 24 Sep 2020 18:13:38 +0200 Subject: [PATCH 1/6] Updated dependencies --- .gitignore | 5 +++- .idea/jarRepositories.xml | 25 ++++++++++++++++++ .idea/misc.xml | 14 ---------- .idea/modules.xml | 10 ------- build.gradle | 13 +++++----- gradle/wrapper/gradle-wrapper.properties | 4 +-- lib/build.gradle | 26 ++++++++++++------- .../FakeAppUpdatesHelper.java | 20 -------------- 8 files changed, 53 insertions(+), 64 deletions(-) create mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml diff --git a/.gitignore b/.gitignore index d0dc0de..8abe94b 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,7 @@ google-services.json # Freeline freeline.py freeline/ -freeline_project_description.json \ No newline at end of file +freeline_project_description.json +.idea/modules.xml + +.idea/misc.xml diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..a5f05cd --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 5569847..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 234790d..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index e2148e5..2484de2 100644 --- a/build.gradle +++ b/build.gradle @@ -17,19 +17,18 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.31' + ext.kotlin_version = '1.4.10' repositories { google() jcenter() - + mavenCentral() + maven {url "https://plugins.gradle.org/m2/"} } dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' + classpath 'com.android.tools.build:gradle:4.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "com.github.dcendents:android-maven-gradle-plugin:2.0" - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files + classpath "com.github.dcendents:android-maven-gradle-plugin:2.1" + classpath "com.gladed.androidgitversion:gradle-android-git-version:0.4.13" } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ec17df2..8d5ac84 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Jun 17 11:03:52 CEST 2019 +#Thu Sep 24 17:32:09 CEST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/lib/build.gradle b/lib/build.gradle index f4a2a21..be87308 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -1,14 +1,20 @@ apply plugin: 'com.android.library' +apply plugin: "com.gladed.androidgitversion" -android { - compileSdkVersion 29 +androidGitVersion { + codeFormat "MMNNPP" + format '%tag%' + tagPattern(/^[0-9]+.*/) // Tag names should follow the pattern vMM.NN.PP +} +android { + compileSdkVersion 30 defaultConfig { minSdkVersion 21 - targetSdkVersion 29 - versionCode 1 - versionName "1.0.0" + targetSdkVersion 30 + versionName androidGitVersion.name() + versionCode androidGitVersion.code() testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -26,15 +32,15 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "androidx.annotation:annotation:1.1.0" - implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.appcompat:appcompat:1.2.0' // Needed for the in-app updates API - implementation "com.google.android.play:core:1.6.1" + implementation "com.google.android.play:core:1.8.0" - testImplementation 'junit:junit:4.12' + testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + androidTestImplementation 'androidx.test:runner:1.3.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' } /* diff --git a/lib/src/main/java/com/bq/appupdateshelper/FakeAppUpdatesHelper.java b/lib/src/main/java/com/bq/appupdateshelper/FakeAppUpdatesHelper.java index ff31454..1fbb868 100644 --- a/lib/src/main/java/com/bq/appupdateshelper/FakeAppUpdatesHelper.java +++ b/lib/src/main/java/com/bq/appupdateshelper/FakeAppUpdatesHelper.java @@ -63,26 +63,6 @@ public void setUpdateAvailable(int availableVersionCode) { fakeAppUpdateManager.setUpdateAvailable(availableVersionCode); } - /** - * Returns which type of update is partially allowed or null if no update is partially allowed. - */ - @Nullable - public Integer getPartiallyAllowedUpdateType() { - return fakeAppUpdateManager.getPartiallyAllowedUpdateType(); - } - - /** - * In case the update is only partially allowed, which means that not all in-app update types are allowed by policy, - * the type of update which is exclusively allowed can be set here. - *

- * Also sets the error code to {@link InstallErrorCode.NO_ERROR_PARTIALLY_ALLOWED} to enable the partial error behaviour. - * - * @param allowedUpdate one of {@link AppUpdateType.FLEXIBLE} or {@link AppUpdateType.IMMEDIATE}, or null - */ - public void setPartiallyAllowedUpdateType(@Nullable @AppUpdateType Integer allowedUpdate) { - fakeAppUpdateManager.setPartiallyAllowedUpdateType(allowedUpdate); - } - /** * Declares that no updates are available. */ From f1a104902e80335e936dd0ce1e7558d7c4dc71e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20S=C3=A1nchez=20Ceinos?= Date: Fri, 25 Sep 2020 08:49:40 +0200 Subject: [PATCH 2/6] Update lib/build.gradle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adrián García --- lib/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/build.gradle b/lib/build.gradle index be87308..df743bc 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -4,7 +4,7 @@ apply plugin: "com.gladed.androidgitversion" androidGitVersion { codeFormat "MMNNPP" format '%tag%' - tagPattern(/^[0-9]+.*/) // Tag names should follow the pattern vMM.NN.PP + tagPattern(/^[0-9]+.*/) // Tag names should follow the pattern MM.NN.PP } android { From 89230570a1f181c9b63b437607f8cf1f4a69884b Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Ceinos Date: Fri, 25 Sep 2020 09:22:22 +0200 Subject: [PATCH 3/6] Fix merge --- lib/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/build.gradle b/lib/build.gradle index b17dada..09e1ed3 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -35,7 +35,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' // Needed for the in-app updates API - implementation "com.google.android.play:core:1.8.0" + api "com.google.android.play:core:1.8.0" testImplementation 'junit:junit:4.13' From c1e8abbc20b100389d6392948fe6171e0133324c Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Ceinos Date: Fri, 25 Sep 2020 09:23:21 +0200 Subject: [PATCH 4/6] Reorder gitignore --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8abe94b..f7625ae 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,8 @@ captures/ .idea/libraries .idea/caches .idea/codeStyles +.idea/modules.xml +.idea/misc.xml # Keystore files *.jks @@ -55,6 +57,4 @@ google-services.json freeline.py freeline/ freeline_project_description.json -.idea/modules.xml -.idea/misc.xml From 3700c1789dbd29b749e09f7d6c8d0bebc84274f3 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Ceinos Date: Fri, 25 Sep 2020 09:25:04 +0200 Subject: [PATCH 5/6] Ignore jarRepositories.xml --- .gitignore | 4 ++-- .idea/jarRepositories.xml | 25 ------------------------- 2 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 .idea/jarRepositories.xml diff --git a/.gitignore b/.gitignore index f7625ae..6a02cb8 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ captures/ .idea/codeStyles .idea/modules.xml .idea/misc.xml +.idea/jarRepositories.xml # Keystore files *.jks @@ -56,5 +57,4 @@ google-services.json # Freeline freeline.py freeline/ -freeline_project_description.json - +freeline_project_description.json \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index a5f05cd..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file From bacb04c0e866bf98564c6c9a6bcabac23efc5b7f Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Ceinos Date: Fri, 25 Sep 2020 09:29:21 +0200 Subject: [PATCH 6/6] Fix deprecated gradle methods --- build.gradle | 5 +++-- lib/build.gradle | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 6a7f154..9b6895f 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.4.10' + ext.kotlinVersion = '1.4.10' + repositories { google() jcenter() @@ -26,7 +27,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:4.0.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "com.github.dcendents:android-maven-gradle-plugin:2.1" classpath "com.gladed.androidgitversion:gradle-android-git-version:0.4.13" } diff --git a/lib/build.gradle b/lib/build.gradle index 09e1ed3..f713937 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -62,7 +62,7 @@ dependencies { // Build a jar with source files task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs - classifier = 'sources' + archiveClassifier.set("sources") } // Build JavaDoc from source files @@ -75,7 +75,7 @@ task javadoc(type: Javadoc) { // Build a jar with JavaDoc task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier.set("javadoc") from javadoc.destinationDir }