diff --git a/.github/workflows/create-documentation-pr.yml b/.github/workflows/create-documentation-pr.yml index 7a3c387..e0efa7b 100644 --- a/.github/workflows/create-documentation-pr.yml +++ b/.github/workflows/create-documentation-pr.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Check out current repository code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Create the documentation pull request uses: apivideo/api.video-create-readme-file-pull-request-action@main diff --git a/.github/workflows/create-release-from-changelog.yml b/.github/workflows/create-release-from-changelog.yml index 393a1b8..5fbbb90 100644 --- a/.github/workflows/create-release-from-changelog.yml +++ b/.github/workflows/create-release-from-changelog.yml @@ -10,7 +10,7 @@ jobs: update-documentation: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Create draft release if needed uses: apivideo/api.video-release-from-changelog-action@main with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0364d64..34c69bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,11 +8,11 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '17' distribution: 'adopt' - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0049d7e..451588b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,11 +6,11 @@ jobs: unit-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '17' distribution: 'adopt' - name: Make gradlew executable run: chmod +x ./gradlew @@ -19,18 +19,18 @@ jobs: instrumented-tests: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '17' distribution: 'adopt' - name: Make gradlew executable run: chmod +x ./gradlew - name: Run Android Tests uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 30 + api-level: 34 arch: x86_64 script: ./gradlew connectedCheck env: diff --git a/CHANGELOG.md b/CHANGELOG.md index f39bd9f..3ee3226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All changes to this project will be documented in this file. +## [1.5.4] - 2024-01-08 +- Upgrade dependencies, gradle and Kotlin + ## [1.5.3] - 2023-12-14 - Add support for API level >= 34 for WorkManager diff --git a/README.md b/README.md index ec1c98d..3d3974d 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Add this dependency to your project's POM: video.api android-api-client - 1.5.3 + 1.5.4 compile ``` @@ -80,7 +80,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -implementation "video.api:android-api-client:1.5.3" +implementation "video.api:android-api-client:1.5.4" ``` #### Others @@ -93,7 +93,7 @@ mvn clean package Then manually install the following JARs: -* `target/android-api-client-1.5.3.jar` +* `target/android-api-client-1.5.4.jar` * `target/lib/*.jar` ### Code sample diff --git a/build.gradle b/build.gradle index ccff27c..6692199 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'maven-publish' apply plugin: 'kotlin-android' group = 'video.api' -version = '1.5.3' +version = '1.5.4' buildscript { repositories { @@ -14,8 +14,8 @@ buildscript { } dependencies { classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' - classpath 'com.android.tools.build:gradle:7.4.1' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21' + classpath 'com.android.tools.build:gradle:8.2.2' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22' classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.8.2.1' } } @@ -33,11 +33,12 @@ if(hasProperty('target') && target == 'android') { apply from: 'maven-push.gradle' android { - compileSdkVersion 33 - buildToolsVersion '30.0.3' + compileSdk 34 + defaultConfig { - minSdkVersion 21 - targetSdkVersion 33 + minSdk 21 + targetSdk 34 + multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -49,6 +50,12 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + + kotlinOptions { + jvmTarget = '1.8' + } + + namespace "video.api.client.api" } } else { @@ -83,21 +90,21 @@ if(hasProperty('target') && target == 'android') { dependencies { implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" - api 'com.squareup.okhttp3:okhttp:4.10.0' - implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' - implementation 'com.google.code.gson:gson:2.8.9' - implementation 'io.gsonfire:gson-fire:1.8.4' + api 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' + implementation 'com.google.code.gson:gson:2.10' + implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'org.openapitools:jackson-databind-nullable:0.2.1' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' - implementation 'org.threeten:threetenbp:1.5.2' - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21" - implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.work:work-runtime-ktx:2.8.0' - testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.0' + implementation 'org.threeten:threetenbp:1.6.8' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.22" + implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.work:work-runtime-ktx:2.9.0' + testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' testImplementation 'junit:junit:4.13.2' testImplementation 'org.mockito:mockito-core:3.12.4' testImplementation 'org.assertj:assertj-core:3.19.0' - testImplementation "com.google.truth:truth:1.1.3" + testImplementation "com.google.truth:truth:1.4.0" androidTestImplementation "com.google.truth:truth:1.1.3" androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' @@ -105,8 +112,8 @@ dependencies { androidTestImplementation 'androidx.test:core:1.5.0' androidTestImplementation 'androidx.test:runner:1.5.2' androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' - androidTestImplementation 'de.mannodermaus.junit5:android-test-core:1.3.0' - androidTestRuntimeOnly 'de.mannodermaus.junit5:android-test-runner:1.3.0' + androidTestImplementation 'de.mannodermaus.junit5:android-test-core:1.10.0' + androidTestRuntimeOnly 'de.mannodermaus.junit5:android-test-runner:1.10.0' } // Use spotless plugin to automatically format code, remove unused import, etc diff --git a/examples/service/build.gradle b/examples/service/build.gradle index 62918f8..e4c3c42 100644 --- a/examples/service/build.gradle +++ b/examples/service/build.gradle @@ -23,28 +23,34 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + kotlinOptions { jvmTarget = '1.8' } + packagingOptions { resources { excludes += ['META-INF/DEPENDENCIES'] } } + buildFeatures { viewBinding true } + + namespace "video.api.client.service.example" } dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'androidx.preference:preference-ktx:1.2.0' + implementation 'androidx.preference:preference-ktx:1.2.1' implementation project(path: ':') diff --git a/examples/service/src/main/AndroidManifest.xml b/examples/service/src/main/AndroidManifest.xml index 4910b84..287b84b 100644 --- a/examples/service/src/main/AndroidManifest.xml +++ b/examples/service/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/examples/workmanager/build.gradle b/examples/workmanager/build.gradle index 2c38ea0..c5d0397 100644 --- a/examples/workmanager/build.gradle +++ b/examples/workmanager/build.gradle @@ -23,31 +23,37 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + kotlinOptions { jvmTarget = '1.8' } + packagingOptions { resources { excludes += ['META-INF/DEPENDENCIES'] } } + buildFeatures { viewBinding true } + + namespace "video.api.client.work.example" } dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'androidx.preference:preference-ktx:1.2.0' + implementation 'androidx.preference:preference-ktx:1.2.1' implementation project(path: ':') - implementation 'androidx.work:work-runtime-ktx:2.8.0' + implementation 'androidx.work:work-runtime-ktx:2.9.0' testImplementation 'junit:junit:4.13.2' } \ No newline at end of file diff --git a/examples/workmanager/src/main/AndroidManifest.xml b/examples/workmanager/src/main/AndroidManifest.xml index 80497d3..4fa7f04 100644 --- a/examples/workmanager/src/main/AndroidManifest.xml +++ b/examples/workmanager/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/gradle.properties b/gradle.properties index b3a4f28..4c95bd5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,4 @@ target = android android.useAndroidX=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8049c68..15de902 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.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/maven-push.gradle b/maven-push.gradle index 39f1cee..8b26f97 100644 --- a/maven-push.gradle +++ b/maven-push.gradle @@ -18,7 +18,7 @@ apply plugin: 'maven-publish' apply plugin: 'signing' def isReleaseBuild() { - return !"1.5.3".contains("SNAPSHOT") + return !"1.5.4".contains("SNAPSHOT") } def getReleaseRepositoryUrl() { @@ -39,7 +39,17 @@ def getRepositoryPassword() { return hasProperty('OSSRH_PASSWORD') ? OSSRH_PASSWORD : System.getenv("OSSRH_PASSWORD") } -afterEvaluate { project -> +android { + publishing { + multipleVariants { + withSourcesJar() + withJavadocJar() + allVariants() + } + } +} + +afterEvaluate { publishing { publications { release(MavenPublication) { @@ -47,7 +57,7 @@ afterEvaluate { project -> groupId = "video.api" artifactId = "android-api-client" - version = "1.5.3" + version = "1.5.4" pom { name = "video.api:android-api-client" diff --git a/pom.xml b/pom.xml index d40387c..29afd2f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ android-api-client jar ${project.groupId}:${project.artifactId} - 1.5.3 + 1.5.4 https://github.com/apivideo/api.video-android-client The official Android api.video client diff --git a/src/androidTest/AndroidManifest.xml b/src/androidTest/AndroidManifest.xml index 9094e63..fd43cdf 100644 --- a/src/androidTest/AndroidManifest.xml +++ b/src/androidTest/AndroidManifest.xml @@ -1,6 +1,5 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 482b3a9..73c861c 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,4 +1,4 @@ - + diff --git a/src/main/java/video/api/client/api/ApiClient.java b/src/main/java/video/api/client/api/ApiClient.java index 2eb8440..ba62a70 100644 --- a/src/main/java/video/api/client/api/ApiClient.java +++ b/src/main/java/video/api/client/api/ApiClient.java @@ -118,7 +118,7 @@ private OkHttpClient initHttpClient(List interceptors) { private void init() { verifyingSsl = true; json = new JSON(); - addDefaultHeader("AV-Origin-Client", "android:1.5.3"); + addDefaultHeader("AV-Origin-Client", "android:1.5.4"); } private boolean isValid(String regex, String field) {