Skip to content

Commit

Permalink
Merge pull request #34 from infinum/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bojankoma authored Jan 14, 2022
2 parents 18efb06 + 4ece592 commit 97e0c0c
Show file tree
Hide file tree
Showing 141 changed files with 4,161 additions and 370 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/tool-thimble/build/
/tool-appgallery/build/
/tool-leakcanary/build/
/tool-timber/build/

publish.properties
*.gpg
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
Change Log
==========

## Version 1.1.9

_2022-01-14_

* Implement screen information in Device tab.
* Implement font scale information in Device tab.
* Implement Proximity sensor trigger.
* Add Timber tool.
* Add Certificates tool.

## Version 1.1.8

_2022-01-10_
_2022-01-06_

* Implement root check row in Device tab.
* Implement crash monitor for uncaught exceptions and ANRs.
Expand Down
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The project is organized in the following modules:
- `tool-appgallery` - contains a class wrapper for Huawei AppGallery
- `tool-googleplay` - contains a class wrapper for Google Play
- `tool-thimble` - contains a class wrapper for Thimble
- `tool-timber` - contains a class wrapper for Timber
- `sample` - a sample app for testing and developing

## Usage
Expand Down Expand Up @@ -56,15 +57,15 @@ Then add the following dependencies in your app `build.gradle` or `build.gradle.
**Groovy**

```groovy
debugImplementation "com.infinum.sentinel:sentinel:1.1.8"
releaseImplementation "com.infinum.sentinel:sentinel-no-op:1.1.8"
debugImplementation "com.infinum.sentinel:sentinel:1.1.9"
releaseImplementation "com.infinum.sentinel:sentinel-no-op:1.1.9"
```

**KotlinDSL**

```kotlin
debugImplementation("com.infinum.sentinel:sentinel:1.1.8")
releaseImplementation("com.infinum.sentinel:sentinel-no-op:1.1.8")
debugImplementation("com.infinum.sentinel:sentinel:1.1.9")
releaseImplementation("com.infinum.sentinel:sentinel-no-op:1.1.9")
```

Basic tools are provided inside the main package but depending on requirements you might want to add
Expand All @@ -73,25 +74,27 @@ specific tools:
**Groovy**

```groovy
debugImplementation "com.infinum.sentinel:tool-chucker:1.1.8"
debugImplementation "com.infinum.sentinel:tool-collar:1.1.8"
debugImplementation "com.infinum.sentinel:tool-dbinspector:1.1.8"
debugImplementation "com.infinum.sentinel:tool-leakcanary:1.1.8"
debugImplementation "com.infinum.sentinel:tool-appgallery:1.1.8"
debugImplementation "com.infinum.sentinel:tool-googleplay:1.1.8"
debugImplementation "com.infinum.sentinel:tool-thimble:1.1.8"
debugImplementation "com.infinum.sentinel:tool-chucker:1.1.9"
debugImplementation "com.infinum.sentinel:tool-collar:1.1.9"
debugImplementation "com.infinum.sentinel:tool-dbinspector:1.1.9"
debugImplementation "com.infinum.sentinel:tool-leakcanary:1.1.9"
debugImplementation "com.infinum.sentinel:tool-appgallery:1.1.9"
debugImplementation "com.infinum.sentinel:tool-googleplay:1.1.9"
debugImplementation "com.infinum.sentinel:tool-thimble:1.1.9"
debugImplementation "com.infinum.sentinel:tool-timber:1.1.9"
```

**KotlinDSL**

```kotlin
debugImplementation("com.infinum.sentinel:tool-chucker:1.1.8")
debugImplementation("com.infinum.sentinel:tool-collar:1.1.8")
debugImplementation("com.infinum.sentinel:tool-dbinspector:1.1.8")
debugImplementation("com.infinum.sentinel:tool-leakcanary:1.1.8")
debugImplementation("com.infinum.sentinel:tool-appgallery:1.1.8")
debugImplementation("com.infinum.sentinel:tool-googleplay:1.1.8")
debugImplementation("com.infinum.sentinel:tool-thimble:1.1.8")
debugImplementation("com.infinum.sentinel:tool-chucker:1.1.9")
debugImplementation("com.infinum.sentinel:tool-collar:1.1.9")
debugImplementation("com.infinum.sentinel:tool-dbinspector:1.1.9")
debugImplementation("com.infinum.sentinel:tool-leakcanary:1.1.9")
debugImplementation("com.infinum.sentinel:tool-appgallery:1.1.9")
debugImplementation("com.infinum.sentinel:tool-googleplay:1.1.9")
debugImplementation("com.infinum.sentinel:tool-thimble:1.1.9")
debugImplementation("com.infinum.sentinel:tool-timber:1.1.9")
```

Now you can sync your project.
Expand All @@ -110,7 +113,9 @@ Sentinel.watch(
LeakCanaryTool(),
AppGalleryTool(appId = "123456789"),
GooglePlayTool(),
ThimbleTool()
ThimbleTool(),
TimberTool(),
CertificateTool(userManagers = listOf())
)
)
```
Expand All @@ -131,6 +136,7 @@ _Sentinel_ provides several different levels of tools for a developer to impleme
avoiding _TransactionTooLarge_ exceptions
- `Preference Editor` - by tapping any preference _Sentinel_ opens a screen where you can edit
current value
- `CertificateTool` - opens a list of system and user provided X.509 certificates with details

#### Dependency wrappers

Expand All @@ -142,6 +148,7 @@ Depending of what you include as module dependencies, very specific tools are pr
opens [DbInspector](https://github.com/infinum/android_dbinspector)
- `LeakCanaryTool` - a wrapper class that opens [LeakCanary](https://github.com/square/leakcanary)
- `ThimbleTool` - a wrapper class that opens [Thimble](https://github.com/infinum/android-thimble)
- `TimberTool` - a wrapper class that opens [Timber](https://github.com/JakeWharton/timber)
- `AppGalleryTool` - a wrapper class that opens Huawei AppGallery of a published application or a
web page of the application if Huawei AppGallery is not found
- `GooglePlayTool` - a wrapper class that opens Google Play of a published application or a web page
Expand Down Expand Up @@ -191,6 +198,7 @@ between sessions.

- `Manual` - used for manually triggering UI with _show()_
- `Shake` - default trigger to show UI, shake device to invoke
- `Proximity` - shows UI every time sensor detects _near_ state
- `Foreground` - shows UI every time application goes into foreground
- `USB connected` - shows UI every time an USB cable is plugged in
- `Airplane mode on` - shows UI every time Airplane mode is turned on
Expand Down
4 changes: 2 additions & 2 deletions config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
]
releaseConfig = [
"group" : "com.infinum.sentinel",
"version" : "1.1.8",
"versionCode": 1 * 100 * 100 + 1 * 100 + 8
"version" : "1.1.9",
"versionCode": 1 * 100 * 100 + 1 * 100 + 9
]
}
17 changes: 14 additions & 3 deletions deploy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ task deployToolThimble(dependsOn: [
description = "Deploy module to repositories"
}

task deployToolTimber(dependsOn: [
':tool-timber:clean',
':tool-timber:publishReleasePublicationToSonatypeRepository'
]) {
group = "Deploy"
description = "Deploy module to repositories"
}

task deploySentinelAll(dependsOn: [
'deploySentinel',
'deploySentinelNoOp'
Expand All @@ -85,7 +93,8 @@ task deployToolsAll(dependsOn: [
'deployToolDbInspector',
'deployToolAppGallery',
'deployToolGooglePlay',
'deployToolThimble'
'deployToolThimble',
'deployToolTimber'
]) {
group = "Deploy"
description = "Deploy all tools modules to repositories"
Expand All @@ -100,7 +109,8 @@ task deployAll(dependsOn: [
'deployToolLeakCanary',
'deployToolAppGallery',
'deployToolGooglePlay',
'deployToolThimble'
'deployToolThimble',
'deployToolTimber'
]) {
group = "Deploy"
description = "Deploy all modules to repositories"
Expand All @@ -124,7 +134,8 @@ task deployDebug(dependsOn: [
':tool-leakcanary:publishReleasePublicationToMavenLocal',
':tool-appgallery:publishReleasePublicationToMavenLocal',
':tool-googleplay:publishReleasePublicationToMavenLocal',
':tool-thimble:publishReleasePublicationToMavenLocal'
':tool-thimble:publishReleasePublicationToMavenLocal',
':tool-timber:publishReleasePublicationToMavenLocal'
]) {
group = "Deploy"
description = "Deploy all modules to Mavel Local repository"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ org.gradle.jvmargs=-Xmx1536m
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableJetifier=false
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
21 changes: 16 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
[versions]
sentinel = "1.1.8"
sentinel = "1.1.9"
gradle = "7.0.4"
desugar = "1.1.5"
kotlin = "1.6.10"
coroutines = "1.6.0"
json = "1.3.2"
core = "1.7.0"
appcompat = "1.4.0"
activity = "1.4.0"
fragment = "1.4.0"
recycler = "1.2.1"
lifecycle = "2.4.0"
preference = "1.1.1"
room = "2.4.0"
workmanager = "2.7.1"
startup = "1.1.0"
crypto = "1.1.0-alpha03"
dynamicanimation = "1.0.0"
Expand Down Expand Up @@ -39,9 +42,12 @@ toolleakcanary = { module = "com.infinum.sentinel:tool-leakcanary", version.ref
toolappgallery = { module = "com.infinum.sentinel:tool-appgallery", version.ref = "sentinel" }
toolgoogleplay = { module = "com.infinum.sentinel:tool-googleplay", version.ref = "sentinel" }
toolthimble = { module = "com.infinum.sentinel:tool-thimble", version.ref = "sentinel" }
tooltimber = { module = "com.infinum.sentinel:tool-timber", version.ref = "sentinel" }

tools-gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }

desugar = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar" }

kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-core = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
Expand All @@ -53,6 +59,7 @@ androidx-core = { module = "androidx.core:core-ktx", version.ref = "core" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "activity" }
androidx-fragment = { module = "androidx.fragment:fragment-ktx", version.ref = "fragment" }
androidx-recycler = { module = "androidx.recyclerview:recyclerview", version.ref = "recycler" }
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
androidx-lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle" }
Expand All @@ -64,13 +71,12 @@ androidx-dynamicanimation = { module = "androidx.dynamicanimation:dynamicanimati
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" }
androidx-workmanager-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workmanager" }

material = { module = "com.google.android.material:material", version.ref = "design" }

koin = { module = "io.insert-koin:koin-android", version.ref = "koin" }

timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }

detekt-gradle = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }

Expand All @@ -90,12 +96,15 @@ leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.re

thimble = { module = "com.infinum.thimble:thimble", version.ref = "thimble" }

timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }

[bundles]
androidx = [
"androidx-core",
"androidx-appcompat",
"androidx-activity",
"androidx-fragment",
"androidx-recycler",
"androidx-lifecycle-runtime",
"androidx-lifecycle-viewmodel",
"androidx-lifecycle-livedata",
Expand All @@ -105,7 +114,8 @@ androidx = [
"androidx-startup",
"androidx-dynamicanimation",
"androidx-room-runtime",
"androidx-room-ktx"
"androidx-room-ktx",
"androidx-workmanager-ktx"
]
tools = [
"toolchucker",
Expand All @@ -114,5 +124,6 @@ tools = [
"toolleakcanary",
"toolappgallery",
"toolgoogleplay",
"toolthimble"
"toolthimble",
"tooltimber"
]
9 changes: 8 additions & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ android {
}

buildTypes {
release {
debug {
debuggable true
minifyEnabled false
applicationIdSuffix ".debug"
}
release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.dummy
}
Expand Down Expand Up @@ -57,6 +63,7 @@ dependencies {
implementation libs.androidx.preference
implementation libs.androidx.crypto
implementation libs.material
implementation libs.timber

// implementation libs.library
// implementation libs.bundles.tools
Expand Down
18 changes: 18 additions & 0 deletions sample/src/main/assets/selfsigned_knobtviker.cert
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-----BEGIN CERTIFICATE-----
MIIC0jCCAbqgAwIBAgIJAIp9dDpc7eCDMA0GCSqGSIb3DQEBBQUAMBkxFzAVBgNV
BAMTDmtub2J0dmlrZXIuY29tMB4XDTIyMDEwOTIyNDczMloXDTMyMDEwNzIyNDcz
MlowGTEXMBUGA1UEAxMOa25vYnR2aWtlci5jb20wggEiMA0GCSqGSIb3DQEBAQUA
A4IBDwAwggEKAoIBAQC2F89qzvG3pdh/pNPJra+Nf/9YRrsZDZuGysRFcgFwc9E/
fKcDZLWChF1C1GIoAJtOAZLiF91r8r4BGJVRahUIlRS149Rf3eH87im2siQH8NzK
1pjSRRXPAaUQueGAz1vwl+5BLFzcLExo3w8WI5AMHYZW9Z91Wmccxn4Ub/MBkKg1
M3S4yxCuRf2Fe1p0E2DGL4NoI0bRS+WPPv8Hba/CbS0sdk42Hw3XZaMmJPumf7m9
OG02/gy4ZiTa/YHDCoUhNItA7VUkTxDWHEd8oXOnwR3zR7WHzL1KJwOEkH12I3//
1oHM4/ss+wewC4hqgLSIiaaKX1MkNT38EetF3EcnAgMBAAGjHTAbMBkGA1UdEQQS
MBCCDmtub2J0dmlrZXIuY29tMA0GCSqGSIb3DQEBBQUAA4IBAQAcsx5QDyQE1dqd
BYvszW6h9Z9LtMydMkmfIWX+5WWcwGDPIRL4kC6lpyDT82FFrKcyggSOvjSIpvpB
gjNcVZXlDu0ggj8RvJsD6mL1EGBFn549ICXS+edfyAmUGaQzSqCuG2r+swuumcXw
UXGpS3tHOMpziWTTeCY/PLvL051Rm3dZbNLVCOji9jlyIxj+dca4TbOrP3uvTG9M
OoYsawxyCNI+E2bu6xOVQWYwru/7/yTjVPK3DnFQqrOuv1OKMjeh8NaD8CQ0ArR+
OLeOpaZOUjwcTLQsfmIEB12Zn0tP6qsHVHWHZtMHK9I2e/9wZPF/gOzHvFPq9Q1O
+APQx4rM
-----END CERTIFICATE-----
40 changes: 40 additions & 0 deletions sample/src/main/assets/stackexchange.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-----BEGIN CERTIFICATE-----
MIIG8jCCBdqgAwIBAgISBBDHWyRkJmq3FKwlngWwqKMaMA0GCSqGSIb3DQEBCwUA
MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD
EwJSMzAeFw0yMjAxMDQxNDEzNTdaFw0yMjA0MDQxNDEzNTZaMB4xHDAaBgNVBAMM
Eyouc3RhY2tleGNoYW5nZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQDAG88cZFblL4lFBX0ffT1Ip7qmV3UEtKoixFsAzOMWQPLQldCystVdXofq
IWKdjIc5Bfx/Gfll8EZlN8SJjNJgS4K+mFVFu3Rd8frW/J+g7yaPhdil2ud+S6nk
qi6i9ISz5GngVyp9+GMPdM2qGuJxrhMz/qrO7Kh5FmYlVsMRyL0inRYoZoFB8KXo
y+rP+LG0yXNtpVZ/arZZYa6DPPyTBJ+dFrnUq2swLIPs6B4DOLrq6/jPaFoyXCtc
IwcckuYWjBJP04aDNsHqNRDyenyDkLMs14VRjqsKzv9kywY25Ek1TdyNfMPQlcIu
8WF6fiF/sn1TLGpm5GCB0UL1DSrjAgMBAAGjggQUMIIEEDAOBgNVHQ8BAf8EBAMC
BaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAw
HQYDVR0OBBYEFFEblhwK93orHVA+kVX3YK6ICUqgMB8GA1UdIwQYMBaAFBQusxe3
WFbLrlAJQOYfr52LFMLGMFUGCCsGAQUFBwEBBEkwRzAhBggrBgEFBQcwAYYVaHR0
cDovL3IzLm8ubGVuY3Iub3JnMCIGCCsGAQUFB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aHwNHCGf7iScNu69FQmrLd0CIBsgAWkUZjrINTvxLUjI
cothD6BajLwrzGXFBtx2ORqQMA0GCSqGSIb3DQEBCwUAA4IBAQBT9eQC4DjBu+fE
cwvdowyU4s+/hgGAqs+vyK4Bfav1WsgvaBG+M6OF/q7Co1BX0ypF+RKdZE7QQmc4
GO/h3zpBJkyj6RCDC91PWvRKfGhQcPf7vTXoh6LjZn9PnxftVn0wuzf/f5AY2gNG
DYebH1kAFVoQzrpL8Ai2SbUbQcnjcH7A7Ryj4tLl5XX8tvoEt4sGHDojqRGQ70yr
D9cSF7ddrPrpLb6yLEkoRcYpiMGt05H5OqaESg/LH+5PyIp7UhHdGY90oq5kpl9S
SBBKFgSp42K9IxpjWEoRU9fXmPt7IgiyJ2hbdN22NwrGafkt52iFdnKpM8enQep2
4du+Kc3B
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@

import com.infinum.sentinel.Sentinel;
import com.infinum.sentinel.sample.databinding.ActivityJavaMainBinding;
import com.infinum.sentinel.ui.tools.CertificateTool;
import com.infinum.sentinel.ui.tools.ChuckerTool;
import com.infinum.sentinel.ui.tools.CollarTool;
import com.infinum.sentinel.ui.tools.DbInspectorTool;
import com.infinum.sentinel.ui.tools.GooglePlayTool;
import com.infinum.sentinel.ui.tools.ThimbleTool;
import com.infinum.sentinel.ui.tools.TimberTool;

import java.util.HashSet;
import java.util.Set;
Expand All @@ -31,6 +33,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
tools.add(new DbInspectorTool());
tools.add(new GooglePlayTool());
tools.add(new ThimbleTool());
tools.add(new TimberTool());
tools.add(new CertificateTool());
Sentinel.watch(tools);

viewBinding.showSentinel.setOnClickListener(v -> Sentinel.show());
Expand Down
Loading

0 comments on commit 97e0c0c

Please sign in to comment.