diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 0e578d3..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,184 +0,0 @@ -*Release notes were automatically generated by [Shipkit](http://shipkit.org/)* - -#### 0.1.24 - - 2021-02-14 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.23...v0.1.24) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.24-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.24) - - Remove dependency on jcenter [(#44)](https://github.com/DroidsOnRoids/FoQA/pull/44) - -#### 0.1.23 - - 2021-01-27 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.22...v0.1.23) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.23-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.23) - - Dependency versions bump: [(#42)](https://github.com/DroidsOnRoids/FoQA/pull/42) - -#### 0.1.22 - - 2020-11-06 - [3 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.21...v0.1.22) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.22-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.22) - - Dependency versions bump: [(#40)](https://github.com/DroidsOnRoids/FoQA/pull/40) - - Dependency versions bump [(#39)](https://github.com/DroidsOnRoids/FoQA/pull/39) - - Dependency versions bump: [(#38)](https://github.com/DroidsOnRoids/FoQA/pull/38) - -#### 0.1.21 - - 2020-08-21 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.20...v0.1.21) by [Artur Kosta](https://github.com/vudzkostek) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.21-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.21) - - Expose hyperion-plugin dependency [(#37)](https://github.com/DroidsOnRoids/FoQA/pull/37) - -#### 0.1.20 - - 2020-08-20 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.19...v0.1.20) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.20-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.20) - - Dependency updates: [(#36)](https://github.com/DroidsOnRoids/FoQA/pull/36) - -#### 0.1.19 - - 2020-05-25 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.18...v0.1.19) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.19-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.19) - - Dependency updates [(#33)](https://github.com/DroidsOnRoids/FoQA/pull/33) - -#### 0.1.18 - - 2020-05-02 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.17...v0.1.18) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.18-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.18) - - Unify min sdk version to 16 [(#32)](https://github.com/DroidsOnRoids/FoQA/pull/32) - -#### 0.1.17 - - 2020-04-04 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.16...v0.1.17) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.17-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.17) - - Dependency updates: [(#31)](https://github.com/DroidsOnRoids/FoQA/pull/31) - -#### 0.1.16 - - 2020-02-09 - [2 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.15...v0.1.16) by [Michał Sikora](https://github.com/MiSikora) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.16-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.16) - - Update Chucker to 3.1.2. [(#30)](https://github.com/DroidsOnRoids/FoQA/pull/30) - -#### 0.1.15 - - 2020-01-27 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.14...v0.1.15) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.15-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.15) - - Dependency updates: [(#29)](https://github.com/DroidsOnRoids/FoQA/pull/29) - -#### 0.1.14 - - 2020-01-23 - [2 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.13...v0.1.14) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.14-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.14) - - Update chucker to 3.1.0 [(#28)](https://github.com/DroidsOnRoids/FoQA/pull/28) - -#### 0.1.13 - - 2020-01-01 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.12...v0.1.13) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.13-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.13) - - Update dependency versions [(#26)](https://github.com/DroidsOnRoids/FoQA/pull/26) - -#### 0.1.12 - - 2019-12-17 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.11...v0.1.12) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.12-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.12) - - Maintenance [(#25)](https://github.com/DroidsOnRoids/FoQA/pull/25) - -#### 0.1.11 - - 2019-12-17 - no code changes (no commits) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.11-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.11) - -#### 0.1.10 - - 2019-12-16 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.9...v0.1.10) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.10-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.10) - - Maintenance [(#24)](https://github.com/DroidsOnRoids/FoQA/pull/24) - -#### 0.1.9 - - 2019-11-04 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.8...v0.1.9) by [Bruno Wieczorek](https://github.com/burnoo) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.9-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.9) - - Change Hyperion core dependencies from implementation to api [(#23)](https://github.com/DroidsOnRoids/FoQA/pull/23) - -#### 0.1.8 - - 2019-11-04 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.7...v0.1.8) by [Bruno Wieczorek](https://github.com/burnoo) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.8-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.8) - - No pull requests referenced in commit messages. - -#### 0.1.7 - - 2019-10-12 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.6...v0.1.7) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.7-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.7) - - Code cleanup [(#21)](https://github.com/DroidsOnRoids/FoQA/pull/21) - -#### 0.1.6 - - 2019-09-29 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.5...v0.1.6) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.6-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.6) - - Dependency versions bump [(#20)](https://github.com/DroidsOnRoids/FoQA/pull/20) - -#### 0.1.5 - - 2019-09-28 - [1 commit](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.4...v0.1.5) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.5-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.5) - - No pull requests referenced in commit messages. - -#### 0.1.4 - - 2019-08-24 - [3 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.3...v0.1.4) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.4-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.4) - - Chucker api dependency [(#19)](https://github.com/DroidsOnRoids/FoQA/pull/19) - -#### 0.1.3 - - 2019-08-22 - [3 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.2...v0.1.3) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.3-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.3) - - Dependencies bump [(#18)](https://github.com/DroidsOnRoids/FoQA/pull/18) - -#### 0.1.2 - - 2019-08-10 - [3 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.1...v0.1.2) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.2-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.2) - - Font scale fix [(#17)](https://github.com/DroidsOnRoids/FoQA/pull/17) - -#### 0.1.1 - - 2019-08-05 - [2 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.1.0...v0.1.1) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.1-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.1) - - Rename library module to foqa [(#16)](https://github.com/DroidsOnRoids/FoQA/pull/16) - -#### 0.1.0 - - 2019-08-03 - [2 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.0.21...v0.1.0) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.1.0-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.1.0) - - Replace Chuck with Chucker [(#15)](https://github.com/DroidsOnRoids/FoQA/pull/15) - -#### 0.0.21 - - 2019-08-03 - [2 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.0.20...v0.0.21) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.0.21-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.0.21) - - Add shipkit team configuration [(#14)](https://github.com/DroidsOnRoids/FoQA/pull/14) - -#### 0.0.20 - - 2019-08-03 - no code changes (no commits) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.0.20-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.0.20) - -#### 0.0.19 - - 2019-08-03 - no code changes (no commits) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.0.19-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.0.19) - -#### 0.0.18 - - 2019-08-01 - [2 commits](https://github.com/DroidsOnRoids/FoQA/compare/v0.0.17...v0.0.18) by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.0.18-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.0.18) - - No pull requests referenced in commit messages. - -#### 0.0.17 - - 2019-07-31 - no code changes (no commits) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.0.17-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.0.17) - -#### 0.0.16 - - 2019-07-29 - no code changes (no commits) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.0.16-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.0.16) - -#### 0.0.15 - - 2019-07-28 - 40 commits by [Karol Wrótniak](https://github.com/koral--) - published to [![Bintray](https://img.shields.io/badge/Bintray-0.0.15-green.svg)](https://bintray.com/droidsonroids/maven/FoQA/0.0.15) - - Add separate plugins to readme [(#7)](https://github.com/DroidsOnRoids/FoQA/pull/7) - - Font scale [(#6)](https://github.com/DroidsOnRoids/FoQA/pull/6) - -#### 0.0.14 - 10.07.2019 -- Gradle 5.5 -- Kotlin 1.3.41 -- Chuck 1.1.47 -- Use `Context` from `View` rather than from `Plugin` - fixes issues like [Hyperion-Android #179](https://github.com/willowtreeapps/Hyperion-Android/issues/179) - -#### 0.0.11 - 13.06.2019 -- Gradle 5.4.1 -- Kotlin 1.3.31 -- Android SDK (target and compile) 29 -- Replace upstream com.readystatesoftware.chuck:library by pl.droidsonroids:chuck - -#### 0.0.10 - 16.04.2019 -- Gradle 5.3.1 -- Kotlin 1.3.30 -- Auto-service 1.0-rc5 -- Change Device Info plugin name reported to Hyperion to Android Device Info - -#### 0.0.9 - 22.03.2019 -- Gradle 5.3 -- Replace Hyperion Chuck with FoQA Chuck - -#### 0.0.8 - 13.03.2019 -- No changes, fix broken upload to Maven Central - -#### 0.0.7 - 11.03.2019 -- Add default font scale value for case when settings does not exist - -#### 0.0.6 - 05.03.2019 -- Android Gradle Plugin 3.3.2 -- Open directly ACTION_MANAGE_WRITE_SETTINGS for given app -- Add minimum API level (24) restriction to font scale plugin - -#### 0.0.5 - 04.03.2019 -- Fix error message in Font scale plugin when system settings write management is not available - -#### 0.0.4 - 04.03.2019 -- Android Debug Database 1.0.5 -- Unify menu item style -- Extract Device info plugin to separate artifact, remove simple menu item dependency -- Add Font scale plugin - -#### 0.0.3 - 11.02.2019 -- Add device market name menu item icon - -#### 0.0.2 - 07.02.2019 -- Hyperion Chuck 1.0.0 -- Hyperion App Info 1.0.0 -- Hyperion Simple Item 0.4.0 -- Android Gradle Plugin 3.3.1 -- Add device market name menu item - -#### 0.0.1 - 04.02.2019 -- Initial release -- Hyperion 0.9.27 -- Android Debug Database 1.0.4 \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 53f2077..c70acb8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) ansi (1.5.0) ast (2.4.2) @@ -13,7 +13,7 @@ GEM colored2 (3.1.2) cork (0.3.0) colored2 (~> 3.1) - danger (8.2.2) + danger (8.3.1) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -25,31 +25,45 @@ GEM kramdown-parser-gfm (~> 1.0) no_proxy_fix octokit (~> 4.7) - terminal-table (~> 1) - danger-android_lint (0.0.8) + terminal-table (>= 1, < 4) + danger-android_lint (0.0.9) danger-plugin-api (~> 1.0) oga danger-kotlin_detekt (0.0.3) danger-plugin-api (~> 1.0) danger-plugin-api (1.0.0) danger (> 2.0) - faraday (1.3.0) + faraday (1.7.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) multipart-post (>= 1.2, < 3) - ruby2_keywords + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) faraday-http-cache (2.2.0) faraday (>= 0.8) + faraday-httpclient (1.0.1) faraday-net_http (1.0.1) - git (1.8.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + git (1.9.1) rchardet (~> 1.8) - kramdown (2.3.0) + kramdown (2.3.1) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - octokit (4.20.0) + octokit (4.21.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) oga (3.3) @@ -58,17 +72,17 @@ GEM open4 (1.3.4) public_suffix (4.0.6) rchardet (1.8.0) - rexml (3.2.4) + rexml (3.2.5) ruby-ll (2.1.2) ansi ast - ruby2_keywords (0.0.4) + ruby2_keywords (0.0.5) sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - unicode-display_width (1.7.0) + terminal-table (3.0.1) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.0.0) PLATFORMS ruby @@ -78,4 +92,4 @@ DEPENDENCIES danger-kotlin_detekt BUNDLED WITH - 2.2.9 \ No newline at end of file + 2.2.16 diff --git a/README.md b/README.md index 147e069..c48a974 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,8 @@ repositories { - Hyperion menu item with font scale changer [Hyperion Font Scale](#font-scale-plugin) - Hyperion menu item with [Chucker](https://github.com/ChuckerTeam/chucker) launcher [Hyperion FoQA Chucker](#chucker-plugin) -See [build.gradle](foqa/build.gradle) for a complete list of components. And [build.gradle](build.gradle.kts) for versions. +See [build.gradle.kts](foqa/build.gradle.kts) for a complete list of components. +And [Dependencies.kt](src/main/kotlin/Dependencies.kt) for versions. ## FoQA Hyperion plugins diff --git a/build.gradle.kts b/build.gradle.kts index 189a191..01da5a2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,8 @@ import com.android.build.gradle.LibraryExtension import io.gitlab.arturbosch.detekt.Detekt import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.shipkit.changelog.GenerateChangelogTask +import org.shipkit.github.release.GithubReleaseTask buildscript { repositories { @@ -12,13 +14,16 @@ buildscript { dependencies { classpath(Dependencies.androidGradlePlugin) classpath(Dependencies.kotlinGradlePlugin) + classpath(Dependencies.publishGradlePlugin) } } plugins { - id("io.gitlab.arturbosch.detekt") version "1.16.0-RC1" - id("org.shipkit.java") version "2.3.5" - id("com.github.ben-manes.versions") version "0.36.0" + id("io.gitlab.arturbosch.detekt") version "1.18.0-RC3" + id("com.github.ben-manes.versions") version "0.39.0" + id("org.shipkit.shipkit-changelog") version "1.1.15" + id("org.shipkit.shipkit-github-release") version "1.1.15" + id("org.shipkit.shipkit-auto-version") version "1.1.19" } repositories { @@ -32,24 +37,36 @@ dependencies { } detekt { - input = files(projectDir) + source = files(projectDir) config = rootProject.files("detekt-config.yml") } -tasks.withType(Detekt::class) { - exclude("build/") - exclude("buildSrc/build/") - parallel = true - reports { - xml.enabled = true - html.enabled = false - txt.enabled = false +tasks { + withType(GenerateChangelogTask::class) { + previousRevision = project.ext["shipkit-auto-version.previous-tag"] as String + githubToken = System.getenv("GH_READ_TOKEN") + repository = "DroidsOnRoids/FoQA" } -} - -tasks.withType(KotlinCompile::class).all { - kotlinOptions { - freeCompilerArgs = listOf("-Xexplicit-api=strict") + withType(GithubReleaseTask::class) { + repository = "DroidsOnRoids/FoQA" + changelog = File(buildDir, "changelog.md") + githubToken = System.getenv("GH_WRITE_TOKEN") + newTagRevision = System.getenv("BITRISE_GIT_COMMIT") + } + withType(Detekt::class) { + exclude("build/") + exclude("buildSrc/build/") + parallel = true + reports { + xml.enabled = true + html.enabled = false + txt.enabled = false + } + } + withType(KotlinCompile::class).all { + kotlinOptions { + freeCompilerArgs = listOf("-Xexplicit-api=strict") + } } } @@ -69,14 +86,13 @@ subprojects { apply(plugin = "com.android.library") apply(plugin = "kotlin-android") apply(plugin = "kotlin-kapt") - apply(plugin = "org.shipkit.bintray") - apply(plugin = "org.shipkit.android-publish") + apply(plugin = "com.vanniktech.maven.publish") with(extensions.getByName("android") as LibraryExtension) { - compileSdkVersion(Dependencies.compileSdk) + compileSdk = Dependencies.compileSdk defaultConfig { - setMinSdkVersion(Dependencies.minSdk) - setTargetSdkVersion(Dependencies.targetSdk) + minSdk = Dependencies.minSdk + targetSdk = Dependencies.targetSdk } resourcePrefix = "foqa_" diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 3292a80..13e589d 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -1,29 +1,31 @@ object Dependencies { - const val compileSdk = 30 + const val compileSdk = 31 const val targetSdk = 30 const val minSdk = 19 - const val autoService = "com.google.auto.service:auto-service:1.0-rc7" - const val androidxAnnotations = "androidx.annotation:annotation:1.2.0-beta01" - const val detektFormatting = "io.gitlab.arturbosch.detekt:detekt-formatting:1.16.0-RC1" - const val detektCli = "io.gitlab.arturbosch.detekt:detekt-cli:1.16.0-RC1" - const val hyperionCore = "com.willowtreeapps.hyperion:hyperion-core:0.9.31" - const val hyperionPlugin = "com.willowtreeapps.hyperion:hyperion-plugin:0.9.31" - const val hyperionAttr = "com.willowtreeapps.hyperion:hyperion-attr:0.9.31" - const val hyperionMeasurement = "com.willowtreeapps.hyperion:hyperion-measurement:0.9.31" - const val hyperionDisk = "com.willowtreeapps.hyperion:hyperion-disk:0.9.31" - const val hyperionRecorder = "com.willowtreeapps.hyperion:hyperion-recorder:0.9.31" - const val hyperionPhoenix = "com.willowtreeapps.hyperion:hyperion-phoenix:0.9.31" - const val hyperionCrash = "com.willowtreeapps.hyperion:hyperion-crash:0.9.31" - const val hyperionSharedPreferences = "com.willowtreeapps.hyperion:hyperion-shared-preferences:0.9.31" - const val hyperionGeigerCounter = "com.willowtreeapps.hyperion:hyperion-geiger-counter:0.9.31" - const val hyperionTimber = "com.willowtreeapps.hyperion:hyperion-timber:0.9.31" - const val hyperionBuildConfig = "com.willowtreeapps.hyperion:hyperion-build-config:0.9.31" + const val autoService = "com.google.auto.service:auto-service:1.0" + const val androidxAnnotations = "androidx.annotation:annotation:1.3.0-alpha01" + const val detektFormatting = "io.gitlab.arturbosch.detekt:detekt-formatting:1.18.0-RC3" + const val detektCli = "io.gitlab.arturbosch.detekt:detekt-cli:1.18.0" + const val hyperionCore = "com.willowtreeapps.hyperion:hyperion-core:0.9.33" + const val hyperionPlugin = "com.willowtreeapps.hyperion:hyperion-plugin:0.9.33" + const val hyperionAttr = "com.willowtreeapps.hyperion:hyperion-attr:0.9.33" + const val hyperionMeasurement = "com.willowtreeapps.hyperion:hyperion-measurement:0.9.33" + const val hyperionDisk = "com.willowtreeapps.hyperion:hyperion-disk:0.9.33" + const val hyperionRecorder = "com.willowtreeapps.hyperion:hyperion-recorder:0.9.33" + const val hyperionPhoenix = "com.willowtreeapps.hyperion:hyperion-phoenix:0.9.33" + const val hyperionCrash = "com.willowtreeapps.hyperion:hyperion-crash:0.9.33" + const val hyperionSharedPreferences = + "com.willowtreeapps.hyperion:hyperion-shared-preferences:0.9.33" + const val hyperionGeigerCounter = "com.willowtreeapps.hyperion:hyperion-geiger-counter:0.9.33" + const val hyperionTimber = "com.willowtreeapps.hyperion:hyperion-timber:0.9.33" + const val hyperionBuildConfig = "com.willowtreeapps.hyperion:hyperion-build-config:0.9.33" const val hyperionAppInfo = "com.github.STAR-ZERO:Hyperion-AppInfo:1.1.0" const val chucker = "com.github.ChuckerTeam.Chucker:library:3.4.0" const val deviceNames = "com.jaredrummler:android-device-names:2.0.0" const val debugDb = "com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:1.0.6" const val multidex = "androidx.multidex:multidex:2.0.1" - const val androidGradlePlugin = "com.android.tools.build:gradle:7.0.0-alpha06" - const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30" + const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.0-alpha10" + const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30" + const val publishGradlePlugin = "com.vanniktech:gradle-maven-publish-plugin:0.17.0" } diff --git a/chucker_plugin/build.gradle.kts b/chucker_plugin/build.gradle.kts index 880b553..e3a99ed 100644 --- a/chucker_plugin/build.gradle.kts +++ b/chucker_plugin/build.gradle.kts @@ -1,5 +1,6 @@ -androidPublish.artifactId = "chucker" -description = "Hyperion plugin for menu item with Chuckuer - simple in-app HTTP inspector. Part of FoQA project." +// androidPublish.artifactId = "chucker" +// description = "Hyperion plugin for menu item +// with Chucker - simple in-app HTTP inspector. Part of FoQA project." dependencies { api(Dependencies.chucker) diff --git a/chucker_plugin/gradle.properties b/chucker_plugin/gradle.properties new file mode 100644 index 0000000..7eb2a65 --- /dev/null +++ b/chucker_plugin/gradle.properties @@ -0,0 +1,2 @@ +POM_ARTIFACT_ID=chucker +POM_DESCRIPTION=Hyperion plugin for menu item with Chucker - simple in-app HTTP inspector. Part of FoQA project. diff --git a/chucker_plugin/src/main/res/layout/foqa_chucker_menu_item.xml b/chucker_plugin/src/main/res/layout/foqa_chucker_menu_item.xml index 797461c..91467d2 100644 --- a/chucker_plugin/src/main/res/layout/foqa_chucker_menu_item.xml +++ b/chucker_plugin/src/main/res/layout/foqa_chucker_menu_item.xml @@ -4,7 +4,6 @@ android:layout_height="wrap_content" android:background="?android:attr/selectableItemBackground" android:drawableStart="@drawable/foqa_ic_perm_scan_wifi" - android:drawableLeft="@drawable/foqa_ic_perm_scan_wifi" android:drawablePadding="28dp" android:gravity="center_vertical|start" android:minHeight="131dp" diff --git a/detekt-config.yml b/detekt-config.yml index abc69d6..559957d 100644 --- a/detekt-config.yml +++ b/detekt-config.yml @@ -2,13 +2,14 @@ build: maxIssues: 0 excludeCorrectable: false weights: - # complexity: 2 - # LongParameterList: 1 - # style: 1 - # comments: 1 + # complexity: 2 + # LongParameterList: 1 + # style: 1 + # comments: 1 config: validation: true + warningsAsErrors: false # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]' excludes: '' @@ -16,20 +17,27 @@ processors: active: true exclude: - 'DetektProgressListener' + # - 'KtFileCountProcessor' + # - 'PackageCountProcessor' + # - 'ClassCountProcessor' # - 'FunctionCountProcessor' # - 'PropertyCountProcessor' - # - 'ClassCountProcessor' - # - 'PackageCountProcessor' - # - 'KtFileCountProcessor' + # - 'ProjectComplexityProcessor' + # - 'ProjectCognitiveComplexityProcessor' + # - 'ProjectLLOCProcessor' + # - 'ProjectCLOCProcessor' + # - 'ProjectLOCProcessor' + # - 'ProjectSLOCProcessor' + # - 'LicenseHeaderLoaderExtension' console-reports: active: true exclude: - - 'ProjectStatisticsReport' - - 'ComplexityReport' - - 'NotificationReport' - # - 'FindingsReport' - - 'FileBasedFindingsReport' + - 'ProjectStatisticsReport' + - 'ComplexityReport' + - 'NotificationReport' + # - 'FindingsReport' + - 'FileBasedFindingsReport' output-reports: active: true @@ -40,27 +48,32 @@ output-reports: comments: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] AbsentOrWrongFileLicense: active: false licenseTemplateFile: 'license.template' + licenseTemplateIsRegex: false CommentOverPrivateFunction: - active: false + active: true CommentOverPrivateProperty: - active: false + active: true + DeprecatedBlockTag: + active: true EndOfSentenceFormat: - active: false + active: true endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)' UndocumentedPublicClass: active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] searchInNestedClass: true searchInInnerClass: true searchInInnerObject: true searchInInnerInterface: true UndocumentedPublicFunction: active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] UndocumentedPublicProperty: active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] complexity: active: true @@ -78,7 +91,16 @@ complexity: ignoreSingleWhenExpression: false ignoreSimpleWhenEntries: false ignoreNestingFunctions: false - nestingFunctions: [run, let, apply, with, also, use, forEach, isNotNull, ifNull] + nestingFunctions: + - 'run' + - 'let' + - 'apply' + - 'with' + - 'also' + - 'use' + - 'forEach' + - 'isNotNull' + - 'ifNull' LabeledExpression: active: false ignoredLabels: [] @@ -88,29 +110,35 @@ complexity: LongMethod: active: true threshold: 60 + ignoreAnnotated: [ ] LongParameterList: active: true functionThreshold: 6 constructorThreshold: 7 ignoreDefaultParameters: false ignoreDataClasses: true - ignoreAnnotated: [] + ignoreAnnotated: [ ] MethodOverloading: active: true threshold: 6 + NamedArguments: + active: true + threshold: 3 NestedBlockDepth: active: true threshold: 4 + ReplaceSafeCallChainWithRun: + active: true StringLiteralDuplication: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] threshold: 3 ignoreAnnotation: true excludeStringsWithLessThan5Characters: true ignoreStringsRegex: '$^' TooManyFunctions: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] thresholdInFiles: 11 thresholdInClasses: 11 thresholdInInterfaces: 11 @@ -126,6 +154,10 @@ coroutines: active: true RedundantSuspendModifier: active: true + SleepInsteadOfDelay: + active: true + SuspendFunWithFlowReturnType: + active: true empty-blocks: active: true @@ -166,12 +198,18 @@ exceptions: active: true ExceptionRaisedInUnexpectedLocation: active: true - methodNames: [toString, hashCode, equals, finalize] + methodNames: + - 'toString' + - 'hashCode' + - 'equals' + - 'finalize' InstanceOfCheckForException: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] NotImplementedDeclaration: active: true + ObjectExtendsThrowable: + active: true PrintStackTrace: active: true RethrowCaughtException: @@ -182,10 +220,10 @@ exceptions: SwallowedException: active: true ignoredExceptionTypes: - - InterruptedException - - NumberFormatException - - ParseException - - MalformedURLException + - 'NumberFormatException' + - 'InterruptedException' + - 'ParseException' + - 'MalformedURLException' allowedExceptionNameRegex: '_|(ignore|expected).*' ThrowingExceptionFromFinally: active: true @@ -193,33 +231,38 @@ exceptions: active: true ThrowingExceptionsWithoutMessageOrCause: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] exceptions: - - IllegalArgumentException - - IllegalStateException - - IOException + - 'ArrayIndexOutOfBoundsException' + - 'Error' + - 'Exception' + - 'IllegalMonitorStateException' + - 'NullPointerException' + - 'IndexOutOfBoundsException' + - 'RuntimeException' + - 'Throwable' ThrowingNewInstanceOfSameException: active: true TooGenericExceptionCaught: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] exceptionNames: - - ArrayIndexOutOfBoundsException - - Error - - Exception - - IllegalMonitorStateException - - NullPointerException - - IndexOutOfBoundsException - - RuntimeException - - Throwable + - 'ArrayIndexOutOfBoundsException' + - 'Error' + - 'Exception' + - 'IllegalMonitorStateException' + - 'NullPointerException' + - 'IndexOutOfBoundsException' + - 'RuntimeException' + - 'Throwable' allowedExceptionNameRegex: '_|(ignore|expected).*' TooGenericExceptionThrown: active: true exceptionNames: - - Error - - Exception - - Throwable - - RuntimeException + - 'Error' + - 'Exception' + - 'Throwable' + - 'RuntimeException' formatting: active: true @@ -228,6 +271,14 @@ formatting: AnnotationOnSeparateLine: active: true autoCorrect: true + AnnotationSpacing: + active: true + autoCorrect: true + ArgumentListWrapping: + active: true + autoCorrect: true + indentSize: 4 + maxLineLength: 120 ChainWrapping: active: true autoCorrect: true @@ -246,7 +297,7 @@ formatting: ImportOrdering: active: true autoCorrect: true - layout: 'idea' + layout: '*,java.**,javax.**,kotlin.**,^' Indentation: active: true autoCorrect: true @@ -255,6 +306,7 @@ formatting: MaximumLineLength: active: true maxLineLength: 120 + ignoreBackTickedIdentifier: false ModifierOrdering: active: true autoCorrect: true @@ -303,6 +355,10 @@ formatting: active: true autoCorrect: true indentSize: 4 + maxLineLength: 120 + SpacingAroundAngleBrackets: + active: true + autoCorrect: true SpacingAroundColon: active: true autoCorrect: true @@ -330,6 +386,9 @@ formatting: SpacingAroundRangeOperator: active: true autoCorrect: true + SpacingAroundUnaryOperator: + active: true + autoCorrect: true SpacingBetweenDeclarationsWithAnnotations: active: true autoCorrect: true @@ -342,43 +401,48 @@ formatting: naming: active: true + BooleanPropertyNaming: + active: true + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + allowedPattern: '^(is|has|are)' ClassNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] classPattern: '[A-Z][a-zA-Z0-9]*' ConstructorParameterNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] parameterPattern: '[a-z][A-Za-z0-9]*' privateParameterPattern: '[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' ignoreOverridden: true EnumNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] enumEntryPattern: '[A-Z][_a-zA-Z0-9]*' ForbiddenClassName: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] - forbiddenName: [] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + forbiddenName: [ ] FunctionMaxLength: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] maximumFunctionNameLength: 30 FunctionMinLength: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] minimumFunctionNameLength: 3 FunctionNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] functionPattern: '([a-z][a-zA-Z0-9]*)|(`.*`)' excludeClassPattern: '$^' ignoreOverridden: true - ignoreAnnotated: ['Composable'] + ignoreAnnotated: + - 'Composable' FunctionParameterNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] parameterPattern: '[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' ignoreOverridden: true @@ -392,33 +456,38 @@ naming: MemberNameEqualsClassName: active: true ignoreOverridden: true + NoNameShadowing: + active: true + NonBooleanPropertyPrefixedWithIs: + active: true + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] ObjectPropertyNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] constantPattern: '[A-Za-z][_A-Za-z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*' PackageNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' TopLevelPropertyNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] constantPattern: '[A-Z][_A-Z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' VariableMaxLength: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] maximumVariableNameLength: 64 VariableMinLength: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] minimumVariableNameLength: 1 VariableNaming: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] variablePattern: '[a-z][A-Za-z0-9]*' privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' @@ -430,23 +499,35 @@ performance: active: true ForEachOnRange: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] SpreadOperator: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] UnnecessaryTemporaryInstantiation: active: true potential-bugs: active: true + AvoidReferentialEquality: + active: true + forbiddenTypePatterns: + - 'kotlin.String' + CastToNullableType: + active: true Deprecation: active: true + DontDowncastCollectionTypes: + active: true + DoubleMutabilityForCollection: + active: true DuplicateCaseInWhenExpression: active: true EqualsAlwaysReturnsTrueOrFalse: active: true EqualsWithHashCodeExist: active: true + ExitOutsideMain: + active: true ExplicitGarbageCollectionCall: active: true HasPlatformType: @@ -454,7 +535,11 @@ potential-bugs: IgnoredReturnValue: active: true restrictToAnnotatedMethods: true - returnValueAnnotations: ['*.CheckReturnValue', '*.CheckResult'] + returnValueAnnotations: + - '*.CheckReturnValue' + - '*.CheckResult' + ignoreReturnValueAnnotations: + - '*.CanIgnoreReturnValue' ImplicitDefaultLocale: active: true ImplicitUnitReturnType: @@ -468,13 +553,14 @@ potential-bugs: active: true LateinitUsage: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] - excludeAnnotatedProperties: [] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + excludeAnnotatedProperties: [ ] ignoreOnClassesPattern: '' MapGetWithNotNullAssertionOperator: active: true MissingWhenCase: active: true + allowElseExpression: true NullableToStringCall: active: true RedundantElseInWhen: @@ -485,12 +571,16 @@ potential-bugs: active: true UnnecessarySafeCall: active: true + UnreachableCatchBlock: + active: true UnreachableCode: active: true UnsafeCallOnNullableType: active: true UnsafeCast: active: true + UnusedUnaryOperator: + active: true UselessPostfixExpression: active: true WrongEqualsTypeParameter: @@ -498,6 +588,8 @@ potential-bugs: style: active: true + ClassOrdering: + active: true CollapsibleIfStatements: active: true DataClassContainsFunctions: @@ -505,6 +597,9 @@ style: conversionFunctionPrefix: 'to' DataClassShouldBeImmutable: active: true + DestructuringDeclarationWithTooManyEntries: + active: true + maxDestructuringEntries: 3 EqualsNullCall: active: true EqualsOnSignatureLine: @@ -518,18 +613,26 @@ style: includeLineWrapping: false ForbiddenComment: active: true - values: ['TODO:', 'FIXME:', 'STOPSHIP:'] + values: + - 'TODO:' + - 'FIXME:' + - 'STOPSHIP:' allowedPatterns: '' ForbiddenImport: active: true - imports: [] + imports: [ ] forbiddenPatterns: '' ForbiddenMethodCall: active: true - methods: ['kotlin.io.println', 'kotlin.io.print'] + methods: + - 'kotlin.io.println' + - 'kotlin.io.print' ForbiddenPublicDataClass: active: true - ignorePackages: ['*.internal', '*.internal.*'] + excludes: [ '**' ] + ignorePackages: + - '*.internal' + - '*.internal.*' ForbiddenVoid: active: true ignoreOverridden: false @@ -537,19 +640,27 @@ style: FunctionOnlyReturningConstant: active: true ignoreOverridableFunction: true - excludedFunctions: 'describeContents' - excludeAnnotatedFunction: ['dagger.Provides'] + ignoreActualFunction: true + excludedFunctions: '' + excludeAnnotatedFunction: + - 'dagger.Provides' LibraryCodeMustSpecifyReturnType: active: true + excludes: [ '**' ] LibraryEntitiesShouldNotBePublic: - active: false + active: true + excludes: [ '**' ] LoopWithTooManyJumpStatements: active: true maxJumpCount: 1 MagicNumber: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] - ignoreNumbers: ['-1', '0', '1', '2'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + ignoreNumbers: + - '-1' + - '0' + - '1' + - '2' ignoreHashCodeFunction: true ignorePropertyDeclaration: false ignoreLocalVariableDeclaration: false @@ -559,6 +670,7 @@ style: ignoreNamedArgument: true ignoreEnums: false ignoreRanges: false + ignoreExtensionFunctions: true MandatoryBracesIfStatements: active: true MandatoryBracesLoops: @@ -573,12 +685,16 @@ style: active: true ModifierOrder: active: true + MultilineLambdaItParameter: + active: true NestedClassesVisibility: active: true NewLineAtEndOfFile: active: true NoTabs: active: true + ObjectLiteralToLambda: + active: true OptionalAbstractKeyword: active: true OptionalUnit: @@ -591,6 +707,8 @@ style: active: true RedundantExplicitType: active: true + RedundantHigherOrderMapUsage: + active: true RedundantVisibilityModifierRule: active: true ReturnCount: @@ -609,6 +727,7 @@ style: ThrowsCount: active: true max: 2 + excludeGuardClauses: false TrailingWhitespace: active: true UnderscoresInNumericLiterals: @@ -616,11 +735,14 @@ style: acceptableDecimalLength: 5 UnnecessaryAbstractClass: active: true - excludeAnnotatedClasses: ['dagger.Module'] + excludeAnnotatedClasses: + - 'dagger.Module' UnnecessaryAnnotationUseSiteTarget: active: true UnnecessaryApply: active: true + UnnecessaryFilter: + active: true UnnecessaryInheritance: active: true UnnecessaryLet: @@ -638,18 +760,28 @@ style: allowedNames: '(_|ignored|expected|serialVersionUID)' UseArrayLiteralsInAnnotations: active: true + UseCheckNotNull: + active: true UseCheckOrError: active: true UseDataClass: active: true - excludeAnnotatedClasses: [] + excludeAnnotatedClasses: [ ] allowVars: false UseEmptyCounterpart: active: true + UseIfEmptyOrIfBlank: + active: true UseIfInsteadOfWhen: active: true + UseIsNullOrEmpty: + active: true + UseOrEmpty: + active: true UseRequire: active: true + UseRequireNotNull: + active: true UselessCallOnNotNull: active: true UtilityClassWithPublicConstructor: @@ -658,5 +790,7 @@ style: active: true WildcardImport: active: true - excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] - excludeImports: ['java.util.*', 'kotlinx.android.synthetic.*'] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + excludeImports: + - 'java.util.*' + - 'kotlinx.android.synthetic.*' diff --git a/device_info_plugin/build.gradle.kts b/device_info_plugin/build.gradle.kts index c1089e8..cb812cc 100644 --- a/device_info_plugin/build.gradle.kts +++ b/device_info_plugin/build.gradle.kts @@ -1,5 +1,5 @@ -androidPublish.artifactId = "deviceinfo" -description = "Hyperion plugin for menu item with device and OS information. Part of FoQA project." +// androidPublish.artifactId = "deviceinfo" +// description = "Hyperion plugin for menu item with device and OS information. Part of FoQA project." dependencies { implementation(Dependencies.deviceNames) diff --git a/device_info_plugin/gradle.properties b/device_info_plugin/gradle.properties new file mode 100644 index 0000000..e919e48 --- /dev/null +++ b/device_info_plugin/gradle.properties @@ -0,0 +1,2 @@ +POM_ARTIFACT_ID=deviceinfo +POM_DESCRIPTION=Hyperion plugin for menu item with device and OS information. Part of FoQA project. diff --git a/device_info_plugin/src/main/res/layout/foqa_deviceinfo_menu_item.xml b/device_info_plugin/src/main/res/layout/foqa_deviceinfo_menu_item.xml index 0e26aca..fa0428c 100644 --- a/device_info_plugin/src/main/res/layout/foqa_deviceinfo_menu_item.xml +++ b/device_info_plugin/src/main/res/layout/foqa_deviceinfo_menu_item.xml @@ -4,7 +4,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableStart="@drawable/foqa_ic_info" - android:drawableLeft="@drawable/foqa_ic_info" android:drawablePadding="28dp" android:gravity="center_vertical|start" android:minHeight="131dp" diff --git a/font_scale_plugin/build.gradle.kts b/font_scale_plugin/build.gradle.kts index f1ec629..d0a8b74 100644 --- a/font_scale_plugin/build.gradle.kts +++ b/font_scale_plugin/build.gradle.kts @@ -1,5 +1,5 @@ -androidPublish.artifactId = "fontscale" -description = "Hyperion plugin for menu item with device and OS information. Part of FoQA project." +// androidPublish.artifactId = "fontscale" +// description = "Hyperion plugin for menu item with device and OS information. Part of FoQA project." dependencies { compileOnly(Dependencies.androidxAnnotations) diff --git a/font_scale_plugin/gradle.properties b/font_scale_plugin/gradle.properties new file mode 100644 index 0000000..b7b4bd3 --- /dev/null +++ b/font_scale_plugin/gradle.properties @@ -0,0 +1,2 @@ +POM_ARTIFACT_ID=fontscale +POM_DESCRIPTION=Hyperion plugin for system font scale changing. Part of FoQA project. diff --git a/font_scale_plugin/src/main/res/layout/foqa_font_scale_menu_item.xml b/font_scale_plugin/src/main/res/layout/foqa_font_scale_menu_item.xml index 51c5c76..635ee88 100644 --- a/font_scale_plugin/src/main/res/layout/foqa_font_scale_menu_item.xml +++ b/font_scale_plugin/src/main/res/layout/foqa_font_scale_menu_item.xml @@ -13,7 +13,6 @@ android:layout_height="@dimen/hype_plugin_icon_size" android:layout_gravity="center_vertical" android:layout_marginEnd="28dp" - android:layout_marginRight="28dp" android:src="@drawable/foqa_ic_font_scale" /> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index cabfdbe..1206467 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -3,23 +3,23 @@ plugins { } android { - compileSdkVersion(Dependencies.compileSdk) + compileSdk = Dependencies.compileSdk defaultConfig { versionCode = 1 applicationId = "pl.droidsonroids.foqa.sample" - minSdkVersion(Dependencies.minSdk) - targetSdkVersion(Dependencies.targetSdk) + minSdk = Dependencies.minSdk + targetSdk = Dependencies.targetSdk multiDexEnabled = true } - lintOptions { - isCheckDependencies = true + lint { + checkDependencies = true xmlOutput = rootProject.file("build/reports/lint/lint-results.xml") } buildTypes { named("debug") { - setMatchingFallbacks("release") + matchingFallbacks += "release" } } } diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index e4e5097..a1375bf 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -8,7 +8,9 @@ android:allowBackup="true" android:supportsRtl="true" tools:ignore="AllowBackup,GoogleAppIndexingWarning,MissingApplicationIcon"> - + diff --git a/settings.gradle.kts b/settings.gradle.kts index c90e2d2..f40b23d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,12 @@ plugins { - id("com.gradle.enterprise") version "3.5.2" + id("com.gradle.enterprise") version "3.6.3" } include(":foqa", ":device_info_plugin", ":font_scale_plugin", ":chucker_plugin", ":sample") + +gradleEnterprise { + buildScan { + termsOfServiceUrl = "https://gradle.com/terms-of-service" + termsOfServiceAgree = "yes" + } +} diff --git a/version.properties b/version.properties index 7edc226..96ff41b 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1 @@ -#Version of the produced binaries. This file is intended to be checked-in. -#It will be automatically bumped by release automation. -version=0.1.25 -previousVersion=0.1.24 +version=0.1.*