diff --git a/.gitignore b/.gitignore index d0dc0de..6a02cb8 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,9 @@ captures/ .idea/libraries .idea/caches .idea/codeStyles +.idea/modules.xml +.idea/misc.xml +.idea/jarRepositories.xml # Keystore files *.jks 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 1c96a5f..9b6895f 100644 --- a/build.gradle +++ b/build.gradle @@ -17,21 +17,19 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlinVersion = '1.3.40' + ext.kotlinVersion = '1.4.10' repositories { google() jcenter() - maven { url "https://plugins.gradle.org/m2/" } + 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:$kotlinVersion" classpath "com.github.dcendents:android-maven-gradle-plugin:2.1" - classpath "com.gladed.androidgitversion:gradle-android-git-version:0.4.9" - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files + 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 792461c..f713937 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -1,15 +1,20 @@ apply plugin: 'com.android.library' +apply plugin: "com.gladed.androidgitversion" -apply plugin: 'com.gladed.androidgitversion' +androidGitVersion { + codeFormat "MMNNPP" + format '%tag%' + tagPattern(/^[0-9]+.*/) // Tag names should follow the pattern MM.NN.PP +} android { - compileSdkVersion project.ext.compileSdkVersion + compileSdkVersion 30 defaultConfig { - minSdkVersion project.ext.minSdkVersion - targetSdkVersion project.ext.targetSdkVersion - versionCode 1 + minSdkVersion 21 + targetSdkVersion 30 versionName androidGitVersion.name() + versionCode androidGitVersion.code() testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -25,16 +30,17 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - api "androidx.annotation:annotation:1.1.0" - api "androidx.appcompat:appcompat:1.0.2" + + implementation "androidx.annotation:annotation:1.1.0" + implementation 'androidx.appcompat:appcompat:1.2.0' // Needed for the in-app updates API - api "com.google.android.play:core:1.6.1" + api "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' } /* @@ -56,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 @@ -69,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 } 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. */