Skip to content

Commit

Permalink
Update 3.5.0 (#637)
Browse files Browse the repository at this point in the history
* Update all dependencies and configs, update code for Detekt

* Prepare for next release (#494)

* Prepare for next release
* Update workflows and readme to mirror latest changes

* Update publishing action name (#495)

* Fixed typo on DialogData (#501)

* Update README.md (#505)

fix the typo

* Fix setting request body plain text in transaction (#538)

* Fix setting request body plain text in transaction

* Add test for plain text request body

* Switch to CircularProgressIndicator

* Switch to Activity Result API

* Add immutable flag to pending intents (#593)

* Update Github Actions workflows to match latest ones

* Bump version

* Resolve lint issues

* Remove test using newer OkHttp API

* Remove breaking change with BuildConfig removal

* Bump kotlinVersion from 1.5.10 to 1.5.20 (#639)

Bumps `kotlinVersion` from 1.5.10 to 1.5.20.

Updates `kotlin-gradle-plugin` from 1.5.10 to 1.5.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.5.10...v1.5.20)

Updates `kotlin-stdlib` from 1.5.10 to 1.5.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.5.10...v1.5.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: Nicola Corti <corti.nico@gmail.com>
Co-authored-by: Okan AYDIN <okanaydin1994@gmail.com>
Co-authored-by: Michał Sikora <michalsikora90@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
5 people committed Jun 28, 2021
1 parent 372378d commit 515b3f0
Show file tree
Hide file tree
Showing 37 changed files with 215 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto_rebase.yaml
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.3.1
uses: cirrus-actions/rebase@1.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/gradle-wrapper-validation.yml
Expand Up @@ -2,8 +2,7 @@ name: Validate Gradle Wrapper
on:
push:
branches:
- develop
- main
- develop
pull_request:
branches:
- '*'
Expand Down
35 changes: 33 additions & 2 deletions .github/workflows/pre-merge.yaml
Expand Up @@ -2,8 +2,7 @@ name: Pre Merge Checks
on:
push:
branches:
- develop
- main
- develop
pull_request:
branches:
- '*'
Expand All @@ -16,8 +15,15 @@ jobs:
runs-on: [ubuntu-latest]

steps:
- name: Cancel Previous Runs
if: github.event_name == 'pull_request'
uses: styfle/cancel-workflow-action@0.9.0
with:
access_token: ${{ github.token }}

- name: Checkout Repo
uses: actions/checkout@v2

- name: Cache Gradle Folders
uses: actions/cache@v2
with:
Expand All @@ -41,6 +47,7 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Cache Gradle Folders
uses: actions/cache@v2
with:
Expand All @@ -56,12 +63,35 @@ jobs:
- name: Stop Gradle
run: ./gradlew --stop

lint:
runs-on: [ubuntu-latest]

steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Cache Gradle Folders
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: cache-gradle-${{ hashFiles('build.gradle') }}
restore-keys: cache-gradle-

- name: Run lint
run: ./gradlew lint

- name: Stop Gradle
run: ./gradlew --stop

ktlint:
runs-on: [ubuntu-latest]

steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Cache Gradle Folders
uses: actions/cache@v2
with:
Expand All @@ -83,6 +113,7 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Cache Gradle Folders
uses: actions/cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yaml
Expand Up @@ -25,10 +25,10 @@ jobs:
name: 'chucker-release-artifacts'
path: '~/.m2/repository/'

- name: Publish to the Snapshot Repository
- name: Publish to the Staging Repository
run: ./gradlew publishReleasePublicationToStagingRepository
env:
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_PASSWORD }}
7 changes: 6 additions & 1 deletion .github/workflows/publish-snapshot.yaml
Expand Up @@ -2,14 +2,19 @@ name: Publish Snapshot
on:
push:
branches:
- develop
- develop

jobs:
publish:
if: ${{ github.repository == 'ChuckerTeam/chucker'}}
runs-on: [ubuntu-latest]

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0
with:
access_token: ${{ github.token }}

- name: Checkout Repo
uses: actions/checkout@v2

Expand Down
11 changes: 5 additions & 6 deletions README.md
Expand Up @@ -37,8 +37,8 @@ Please note that you should add both the `library` and the the `library-no-op` v

```groovy
dependencies {
debugImplementation "com.github.chuckerteam.chucker:library:3.3.0"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.3.0"
debugImplementation "com.github.chuckerteam.chucker:library:3.4.0"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.4.0"
}
```

Expand Down Expand Up @@ -100,7 +100,6 @@ val chuckerInterceptor = ChuckerInterceptor.Builder(context)
// is closed before being read like in Retrofit with Void and Unit types.
.alwaysReadResponseBody(true)
.build()
)

// Don't forget to plug the ChuckerInterceptor inside the OkHttpClient
val client = OkHttpClient.Builder()
Expand Down Expand Up @@ -150,8 +149,8 @@ repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
debugImplementation "com.github.chuckerteam.chucker:library:3.3.1-SNAPSHOT"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.3.1-SNAPSHOT"
debugImplementation "com.github.chuckerteam.chucker:library:3.4.1-SNAPSHOT"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.4.1-SNAPSHOT"
}
```

Expand All @@ -170,7 +169,7 @@ dependencies {

⚠️ Please note that the latest snapshot might be **unstable**. Use it at your own risk ⚠️

If you're looking for the **latest stable version**, you can always find it on the top of the `main` branch.
If you're looking for the **latest stable version**, you can always find it in `Releases` section.

## FAQ ❓

Expand Down
49 changes: 27 additions & 22 deletions build.gradle
@@ -1,43 +1,42 @@
buildscript {
ext {
kotlinVersion = '1.4.10'
androidGradleVersion = '4.1.0'
coroutineVersion = '1.4.0'
kotlinVersion = '1.5.20'
androidGradleVersion = '4.2.1'
coroutineVersion = '1.4.3'

// Google libraries
appCompatVersion = '1.2.0'
activityVersion = '1.2.3'
appCompatVersion = '1.3.0'
constraintLayoutVersion = '2.0.4'
materialComponentsVersion = '1.2.1'
roomVersion = '2.2.5'
fragmentVersion = '1.2.5'
lifecycleVersion = '2.2.0'
materialComponentsVersion = '1.3.0'
roomVersion = '2.3.0'
fragmentVersion = '1.3.5'
lifecycleVersion = '2.3.1'
androidXCoreVersion = '2.1.0'
paletteKtxVersion = '1.0.0'

// Networking
gsonVersion = '2.8.6'
okhttp3Version = '3.12.10'
gsonVersion = '2.8.7'
okhttpVersion = '3.12.10'
retrofitVersion = '2.6.4'

// Debug and quality control
detektVersion = '1.14.0'
dokkaVersion = '1.4.10.2'
ktLintVersion = '0.39.0'
ktLintGradleVersion = '9.4.0'
leakcanaryVersion = '2.5'
detektVersion = '1.17.1'
dokkaVersion = '1.4.32'
ktLintGradleVersion = '10.0.0'
leakcanaryVersion = '2.7'

// Testing
androidxTestCoreVersion = '1.3.0'
junitGradlePluignVersion = '1.6.2.0'
junitVersion = '5.7.0'
mockkVersion = '1.10.2'
robolectricVersion = '4.4'
truthVersion = '1.1'
junitGradlePluignVersion = '1.7.1.1'
junitVersion = '5.7.2'
mockkVersion = '1.11.0'
robolectricVersion = '4.5.1'
truthVersion = '1.1.3'
vintageJunitVersion = '4.13'
}

repositories {
jcenter()
google()
gradlePluginPortal()
}
Expand All @@ -57,8 +56,14 @@ allprojects {
group = GROUP

repositories {
jcenter()
google()
mavenCentral()
jcenter {
content {
includeModule("org.jetbrains.trove4j", "trove4j")
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
}
}
}

tasks.withType(Test) {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Expand Up @@ -18,9 +18,9 @@ org.gradle.parallel=true

android.useAndroidX=true

VERSION_NAME=3.4.0
# 3*100*100 + 4*100 + 0 => 30400
VERSION_CODE=30400
VERSION_NAME=3.5.0
# 3*100*100 + 5*100 + 0 => 30500
VERSION_CODE=30500
GROUP=com.github.chuckerteam.chucker

POM_REPO_NAME=Chucker
Expand Down
6 changes: 5 additions & 1 deletion gradle/gradle-mvn-push.gradle
Expand Up @@ -15,7 +15,7 @@ dokkaJavadoc {
skipEmptyPackages.set(true)

perPackageOption {
prefix.set("com.chuckerteam.chucker.internal")
matchingRegex.set(".*\\.internal.*")
suppress.set(true)
}
}
Expand Down Expand Up @@ -95,6 +95,10 @@ afterEvaluate {
name = 'Olivier Perez'
email = 'olivier@olivierperez.fr'
}
developer {
id = 'michalsikora90'
name = 'Michal Sikora'
}
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions gradle/kotlin-static-analysis.gradle
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: 'org.jlleitschuh.gradle.ktlint'

ktlint {
version = rootProject.ext.ktLintVersion
debug = false
verbose = true
android = false
Expand All @@ -13,7 +12,7 @@ ktlint {
include fileTree("scripts/")
}
filter {
exclude("**/generated/**")
exclude { element -> element.file.path.contains("generated/") }
include("**/kotlin/**")
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 5 additions & 1 deletion library-no-op/build.gradle
Expand Up @@ -18,11 +18,15 @@ android {
lintOptions {
warningsAsErrors true
abortOnError true
// We don't want to impose RTL on consuming applications.
disable 'RtlEnabled'
// Don't fail build if some dependencies outdated
disable 'GradleDependency'
}
}

dependencies {
api "com.squareup.okhttp3:okhttp:$okhttp3Version"
api "com.squareup.okhttp3:okhttp:$okhttpVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
}

Expand Down
Expand Up @@ -6,10 +6,12 @@ import android.content.Intent
/**
* No-op implementation.
*/
@Suppress("UnusedPrivateMember")
public object Chucker {

@Deprecated("This variable will be removed in 4.x release")
public const val SCREEN_HTTP: Int = 1

@Deprecated("This variable will be removed in 4.x release")
public const val SCREEN_ERROR: Int = 2

Expand Down
Expand Up @@ -5,6 +5,7 @@ import android.content.Context
/**
* No-op implementation.
*/
@Suppress("UnusedPrivateMember")
public class ChuckerCollector @JvmOverloads constructor(
context: Context,
public var showNotification: Boolean = true,
Expand Down
Expand Up @@ -9,6 +9,7 @@ import kotlin.jvm.Throws
/**
* No-op implementation.
*/
@Suppress("UnusedPrivateMember")
public class ChuckerInterceptor @JvmOverloads constructor(
context: Context,
collector: Any? = null,
Expand Down
Expand Up @@ -5,6 +5,7 @@ import android.content.Context
/**
* No-op implementation.
*/
@Suppress("UnusedPrivateMember")
public class RetentionManager @JvmOverloads constructor(
context: Context,
retentionPeriod: Any? = null
Expand Down

0 comments on commit 515b3f0

Please sign in to comment.