diff --git a/CHANGELOG.md b/CHANGELOG.md index 930a73870..dfc8dab98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +# [2.0.0](https://github.com/mobilekosmos/Parse-SDK-Android/compare/1.26.0...2.0.0) (2021-10-12) + + +### Bug Fixes + +* remove GCM module ([#1091](https://github.com/mobilekosmos/Parse-SDK-Android/issues/1091)) ([aa16bcf](https://github.com/mobilekosmos/Parse-SDK-Android/commit/aa16bcfd9ef87319f032086f286e5768807f24a7)) +* upgrade Facebook SDK ([#1105](https://github.com/mobilekosmos/Parse-SDK-Android/issues/1105)) ([6f4bdb0](https://github.com/mobilekosmos/Parse-SDK-Android/commit/6f4bdb0495e31dfb7c568a0269dc3dd8dd6b30c3)) + +### Features + +* update all dependencies and modernize the source base ([#1095](https://github.com/mobilekosmos/Parse-SDK-Android/issues/1095)) ([a977d11](https://github.com/mobilekosmos/Parse-SDK-Android/commit/a977d117b02de826981ce6c50e85a2204d989b66)) + + +### BREAKING CHANGES + +* CHANGE + +Support for Google Cloud Messaging (GCM) is removed, use Firebase Cloud Messaging instead. See the [Google developer documentation](https://developers.google.com/cloud-messaging/faq) for more details and migration assistance. ([aa16bcf](aa16bcf)) + # [2.0.0](https://github.com/mtrezza/Parse-SDK-Android/compare/1.22.0...2.0.0) (2021-10-10) diff --git a/bolts-tasks/build.gradle b/bolts-tasks/build.gradle index b86e9794a..4956cf8ea 100644 --- a/bolts-tasks/build.gradle +++ b/bolts-tasks/build.gradle @@ -3,8 +3,8 @@ // This source code is licensed under the MIT license found in the/ // LICENSE file in the root directory of this source tree. -apply plugin: 'java' -apply plugin: 'maven' +apply plugin: 'java-library' +apply plugin: 'maven-publish' dependencies { compileOnly 'com.google.android:android:4.1.1.4' @@ -14,12 +14,12 @@ dependencies { javadoc.options.addStringOption('Xdoclint:none', '-quiet') task sourcesJar(type: Jar) { - classifier = 'sources' + archiveClassifier.set("sources") from sourceSets.main.allJava } -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' +task javadocJar (type: Jar, dependsOn: javadoc) { + archiveClassifier.set("javadoc") from javadoc.destinationDir } @@ -48,4 +48,15 @@ jacocoTestReport { java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 +} + +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "moralisPublication". + moralisPublication(MavenPublication) { + from components.java + } + } + } } \ No newline at end of file diff --git a/build.gradle b/build.gradle index bc52b0821..21533c50e 100644 --- a/build.gradle +++ b/build.gradle @@ -6,9 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:4.2.2" - classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.3" - classpath "com.github.dcendents:android-maven-gradle-plugin:2.1" + classpath "com.android.tools.build:gradle:7.0.3" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jacoco:org.jacoco.core:$jacocoVersion" classpath "com.dicedmelon.gradle:jacoco-android:0.1.5" @@ -17,14 +15,7 @@ buildscript { } plugins { - id "com.github.ben-manes.versions" version "0.28.0" -} - -allprojects { - repositories { - google() - mavenCentral() - } + id "com.github.ben-manes.versions" version "0.39.0" } task clean(type: Delete) { @@ -32,8 +23,7 @@ task clean(type: Delete) { } ext { - compileSdkVersion = 30 - - minSdkVersion = 16 - targetSdkVersion = 30 + compileSdkVersion = 31 + minSdkVersion = 21 + targetSdkVersion = 31 } diff --git a/coroutines/build.gradle b/coroutines/build.gradle index 91eab0f38..781d2b35f 100644 --- a/coroutines/build.gradle +++ b/coroutines/build.gradle @@ -2,6 +2,7 @@ apply plugin: "com.android.library" apply plugin: "kotlin-android" apply plugin: "io.freefair.android-javadoc-jar" apply plugin: "io.freefair.android-sources-jar" +apply plugin: 'maven-publish' android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -25,6 +26,10 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + testCoverageEnabled = false + } + debug { + testCoverageEnabled = true } } @@ -47,4 +52,16 @@ dependencies { api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion" api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion" implementation project(":parse") +} + +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.release + } + } + } } \ No newline at end of file diff --git a/facebook/build.gradle b/facebook/build.gradle index 5a2290dcf..af0653e0d 100644 --- a/facebook/build.gradle +++ b/facebook/build.gradle @@ -1,4 +1,5 @@ apply plugin: "com.android.library" +apply plugin: 'maven-publish' apply plugin: "io.freefair.android-javadoc-jar" apply plugin: "io.freefair.android-sources-jar" @@ -32,5 +33,17 @@ dependencies { testImplementation "junit:junit:4.13.2" testImplementation "org.mockito:mockito-core:3.9.0" - testImplementation "org.robolectric:robolectric:4.6" + testImplementation "org.robolectric:robolectric:4.6.1" } + +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.release + } + } + } +} \ No newline at end of file diff --git a/fcm/build.gradle b/fcm/build.gradle index a7f084ee6..225251c8c 100644 --- a/fcm/build.gradle +++ b/fcm/build.gradle @@ -1,6 +1,7 @@ apply plugin: "com.android.library" apply plugin: "io.freefair.android-javadoc-jar" apply plugin: "io.freefair.android-sources-jar" +apply plugin: 'maven-publish' android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -24,6 +25,10 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + testCoverageEnabled = false + } + debug { + testCoverageEnabled = true } } @@ -37,4 +42,16 @@ android { dependencies { api "com.google.firebase:firebase-messaging:22.0.0" implementation project(":parse") +} + +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.release + } + } + } } \ No newline at end of file diff --git a/google/build.gradle b/google/build.gradle index 4971ca310..85b1038c9 100644 --- a/google/build.gradle +++ b/google/build.gradle @@ -2,6 +2,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: "io.freefair.android-javadoc-jar" apply plugin: "io.freefair.android-sources-jar" +apply plugin: 'maven-publish' android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -32,7 +33,19 @@ android { } dependencies { - api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" api "com.google.android.gms:play-services-auth:19.2.0" + api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation project(":parse") +} + +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.release + } + } + } } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 68ca99ac4..0f80bbf51 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 000000000..46c852919 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +jdk: + - openjdk11 \ No newline at end of file diff --git a/ktx/build.gradle b/ktx/build.gradle index a07891442..f22d86f0e 100644 --- a/ktx/build.gradle +++ b/ktx/build.gradle @@ -2,6 +2,7 @@ apply plugin: "com.android.library" apply plugin: "kotlin-android" apply plugin: "io.freefair.android-javadoc-jar" apply plugin: "io.freefair.android-sources-jar" +apply plugin: 'maven-publish' android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -28,6 +29,10 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + testCoverageEnabled = false + } + debug { + testCoverageEnabled = true } } @@ -44,4 +49,16 @@ android { dependencies { api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation project(":parse") +} + +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.release + } + } + } } \ No newline at end of file diff --git a/parse/build.gradle b/parse/build.gradle index 9e546be6f..02208932a 100644 --- a/parse/build.gradle +++ b/parse/build.gradle @@ -1,6 +1,7 @@ apply plugin: "com.android.library" apply plugin: "io.freefair.android-javadoc-jar" apply plugin: "io.freefair.android-sources-jar" +apply plugin: 'maven-publish' android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -31,6 +32,9 @@ android { debug { testCoverageEnabled = true } + release { + testCoverageEnabled = false + } } compileOptions { @@ -40,8 +44,7 @@ android { } ext { - // Note: Don't update past 3.12.x, as it sets the minSdk to Android 5.0 - okhttpVersion = "3.12.10" + okhttpVersion = "4.9.1" } dependencies { @@ -51,7 +54,7 @@ dependencies { api project(':bolts-tasks') testImplementation 'junit:junit:4.13.2' - testImplementation "org.robolectric:robolectric:4.6" + testImplementation "org.robolectric:robolectric:4.6.1" testImplementation "org.skyscreamer:jsonassert:1.5.0" testImplementation "org.mockito:mockito-core:3.9.0" testImplementation "com.squareup.okhttp3:mockwebserver:$okhttpVersion" @@ -81,10 +84,15 @@ jacocoAndroidUnitTestReport { //endregion -//region Coveralls - -apply plugin: "com.github.kt3k.coveralls" - -coveralls.jacocoReportPath = "${buildDir}/jacoco/jacoco.xml" +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.release + } + } + } +} -//endregion \ No newline at end of file diff --git a/rxjava/build.gradle b/rxjava/build.gradle index d752dff26..b1105ab3d 100644 --- a/rxjava/build.gradle +++ b/rxjava/build.gradle @@ -2,7 +2,7 @@ apply plugin: "com.android.library" apply plugin: "kotlin-android" apply plugin: "io.freefair.android-javadoc-jar" apply plugin: "io.freefair.android-sources-jar" - +apply plugin: 'maven-publish' android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -26,6 +26,10 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + testCoverageEnabled = false + } + debug { + testCoverageEnabled = true } } @@ -40,7 +44,19 @@ android { } dependencies { + api "io.reactivex.rxjava3:rxjava:3.1.1" api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - api "io.reactivex.rxjava3:rxjava:3.0.4" implementation project(":parse") -} \ No newline at end of file +} + +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.release + } + } + } +} diff --git a/settings.gradle b/settings.gradle index 9a8336c06..1903c97ef 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,18 @@ -include ':parse', ':fcm', ':ktx', ':coroutines', 'rxjava', ':google', ':facebook', ':twitter', ':bolts-tasks' +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + maven { url "https://jitpack.io" } + } +} +include ':parse', + ':fcm', + ':ktx', + ':coroutines', + 'rxjava', + ':google', + ':facebook', + ':twitter', + ':bolts-tasks' diff --git a/twitter/build.gradle b/twitter/build.gradle index da7f604ad..dadc14af0 100644 --- a/twitter/build.gradle +++ b/twitter/build.gradle @@ -1,6 +1,7 @@ apply plugin: "com.android.library" apply plugin: "io.freefair.android-javadoc-jar" apply plugin: "io.freefair.android-sources-jar" +apply plugin: 'maven-publish' android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -20,6 +21,15 @@ android { abortOnError false } + buildTypes { + debug { + testCoverageEnabled = true + } + release { + testCoverageEnabled = false + } + } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -28,10 +38,22 @@ android { dependencies { api "androidx.appcompat:appcompat:1.3.1" - api "oauth.signpost:signpost-core:1.2.1.2" + api "oauth.signpost:signpost-core:2.1.1" api "se.akerfeldt:okhttp-signpost:1.1.0" implementation project(":parse") testImplementation "junit:junit:4.13.2" testImplementation "org.mockito:mockito-core:3.9.0" } + +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.release + } + } + } +}