Skip to content

Commit

Permalink
Merge pull request #68 from infinum/develop
Browse files Browse the repository at this point in the history
Updating master with develop
  • Loading branch information
KCeh authored May 20, 2024
2 parents 7ad4ec6 + a32fd89 commit d132794
Show file tree
Hide file tree
Showing 77 changed files with 637 additions and 512 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ Then add the following dependencies in your app `build.gradle` or `build.gradle.
**Groovy**

```groovy
def sentinelVersion = "1.3.2"
def sentinelVersion = "1.3.3"
debugImplementation "com.infinum.sentinel:sentinel:$sentinelVersion"
releaseImplementation "com.infinum.sentinel:sentinel-noop:$sentinelVersion"
```

**KotlinDSL**

```kotlin
val sentinelVersion = "1.3.2"
val sentinelVersion = "1.3.3"
debugImplementation("com.infinum.sentinel:sentinel:$sentinelVersion")
releaseImplementation("com.infinum.sentinel:sentinel-no-op:$sentinelVersion")
```
Expand Down Expand Up @@ -116,8 +116,8 @@ Sentinel.watch(
AppGalleryTool(appId = "123456789"),
GooglePlayTool(),
ThimbleTool(),
TimberTool(allowedTags = listOf("EXAMPLE"),
CertificateTool(userManagers = listOf())
TimberTool(allowedTags = listOf("EXAMPLE")),
CertificateTool(userCertificates = listOf())
)
)
```
Expand Down

This file was deleted.

8 changes: 4 additions & 4 deletions config.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ext {
def major = 1
def minor = 3
def patch = 2
def patch = 3

buildConfig = [
"minSdk" : 21,
"compileSdk": 33,
"targetSdk" : 33,
"buildTools": "33.0.2"
"compileSdk": 34,
"targetSdk" : 34,
"buildTools": "34.0.0"
]
releaseConfig = [
"group" : "com.infinum.sentinel",
Expand Down
29 changes: 13 additions & 16 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
[versions]
sentinel = "1.3.2"
gradle = "8.0.2"
desugar = "2.0.3"
kotlin = "1.8.21"
coroutines = "1.7.1"
sentinel = "1.3.3"
gradle = "8.3.2"
kotlin = "1.9.22"
coroutines = "1.8.0"
json = "1.5.1"
core = "1.10.1"
core = "1.12.0"
appcompat = "1.6.1"
activity = "1.7.2"
fragment = "1.5.7"
recycler = "1.3.0"
lifecycle = "2.6.1"
preference = "1.2.0"
room = "2.5.1"
workmanager = "2.8.1"
activity = "1.8.2"
fragment = "1.6.2"
recycler = "1.3.2"
lifecycle = "2.7.0"
preference = "1.2.1"
room = "2.6.1"
workmanager = "2.9.0"
startup = "1.1.1"
crypto = "1.1.0-alpha06"
dynamicanimation = "1.0.0"
design = "1.9.0"
design = "1.11.0"
inject = "0.6.1"
timber = "5.0.1"
detekt = "1.23.0"
Expand Down Expand Up @@ -46,8 +45,6 @@ tooltimber = { module = "com.infinum.sentinel:tool-timber", version.ref = "senti

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 Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 0 additions & 9 deletions maven.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import com.infinum.maven.GithubConfiguration
import com.infinum.maven.SonatypeConfiguration

GithubConfiguration.metaClass.constructor = { ->
def constructor = GithubConfiguration.class.getConstructor()
def instance = constructor.newInstance()
instance.load()
instance
}

SonatypeConfiguration.metaClass.constructor = { ->
def constructor = SonatypeConfiguration.class.getConstructor()
def instance = constructor.newInstance()
Expand All @@ -16,6 +8,5 @@ SonatypeConfiguration.metaClass.constructor = { ->
}

ext {
github = new GithubConfiguration()
sonatype = new SonatypeConfiguration()
}
18 changes: 11 additions & 7 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-feature
android:name="android.hardware.camera"
android:required="false"/>

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

<application
android:name=".SampleApplication"
Expand All @@ -20,17 +24,17 @@
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".JavaMainActivity"
android:exported="false" />
android:exported="false"/>
<activity
android:name=".BundleActivity"
android:exported="false" />
android:exported="false"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.infinum.sentinel.sample;

import android.os.Build;
import android.os.Bundle;

import androidx.annotation.Nullable;
Expand Down Expand Up @@ -34,7 +35,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
tools.add(new GooglePlayTool());
tools.add(new ThimbleTool());
tools.add(new TimberTool());
tools.add(new CertificateTool());
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
tools.add(new CertificateTool());
}
Sentinel.watch(tools);

viewBinding.showSentinel.setOnClickListener(v -> Sentinel.show());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.infinum.sentinel.sample

import android.app.Application
import android.os.Build
import com.infinum.sentinel.Sentinel
import com.infinum.sentinel.ui.tools.AppGalleryTool
import com.infinum.sentinel.ui.tools.CertificateTool
Expand All @@ -19,19 +20,23 @@ class SampleApplication : Application() {
override fun onCreate() {
super.onCreate()

Sentinel.watch(
setOf(
ChuckerTool(),
CollarTool(),
DbInspectorTool(),
LeakCanaryTool(),
AppGalleryTool(appId = "102016595"),
GooglePlayTool(),
ThimbleTool(),
TimberTool(allowedTags = listOf("Main")),
CertificateTool(userCertificates = loadDebugCertificates())
)
)
Sentinel.watch(getWatchedTools())
}

private fun getWatchedTools(): Set<Sentinel.Tool> {
val tools = mutableSetOf<Sentinel.Tool>()
tools.add(ChuckerTool())
tools.add(CollarTool())
tools.add(DbInspectorTool())
tools.add(LeakCanaryTool())
tools.add(AppGalleryTool(appId = "102016595"))
tools.add(GooglePlayTool())
tools.add(ThimbleTool())
tools.add(TimberTool(allowedTags = listOf("Main")))
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
tools.add(CertificateTool(userCertificates = loadDebugCertificates()))
}
return tools
}

private fun loadDebugCertificates(): List<X509Certificate> {
Expand Down
4 changes: 0 additions & 4 deletions sentinel-no-op/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@ android {
defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk
versionCode releaseConfig.versionCode
versionName releaseConfig.version
}

buildTypes {
debug {
debuggable true
minifyEnabled false
}
release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.txt"
}
Expand Down
8 changes: 0 additions & 8 deletions sentinel-no-op/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ afterEvaluate {
password sonatype.password()
}
}
maven {
name github.name()
url github.url()
credentials {
username github.username()
password github.password()
}
}
}
publications {
release(MavenPublication) {
Expand Down
32 changes: 13 additions & 19 deletions sentinel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "com.android.library"
id "kotlin-android"
id "org.jetbrains.kotlin.plugin.serialization"
id "com.google.devtools.ksp" version "1.8.21-1.0.11"
id "com.google.devtools.ksp" version "1.9.22-1.0.17"
}

apply from: "jacoco.gradle"
Expand All @@ -14,8 +14,6 @@ android {
defaultConfig {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk
versionCode releaseConfig.versionCode
versionName releaseConfig.version

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand All @@ -31,11 +29,9 @@ android {
buildTypes {
debug {
testCoverageEnabled true
debuggable true
minifyEnabled false
}
release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.txt"
}
Expand All @@ -57,7 +53,6 @@ android {
disable "RtlEnabled", "VectorPath"
}
compileOptions {
coreLibraryDesugaringEnabled true
}
kotlinOptions {
freeCompilerArgs += [
Expand Down Expand Up @@ -93,7 +88,6 @@ dokkaJavadoc {
}

dependencies {
coreLibraryDesugaring libs.desugar
implementation libs.kotlin.core
implementation libs.kotlin.json
implementation libs.coroutines
Expand All @@ -104,21 +98,21 @@ dependencies {
implementation libs.inject.runtime

androidTestImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.arch.core:core-testing:2.1.0"
androidTestImplementation "androidx.test:core-ktx:1.4.0"
androidTestImplementation "androidx.test:rules:1.4.0"
androidTestImplementation "androidx.test:runner:1.4.0"
androidTestImplementation "androidx.test.ext:junit:1.1.3"
androidTestImplementation "androidx.security:security-crypto:1.1.0-alpha03"
androidTestImplementation "androidx.arch.core:core-testing:2.2.0"
androidTestImplementation "androidx.test:core-ktx:1.5.0"
androidTestImplementation "androidx.test:rules:1.5.0"
androidTestImplementation "androidx.test:runner:1.5.2"
androidTestImplementation "androidx.test.ext:junit:1.1.5"
androidTestImplementation "androidx.security:security-crypto:1.1.0-alpha06"
androidTestImplementation "org.robolectric:shadowapi:4.5.1"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
androidTestImplementation "androidx.test.espresso:espresso-intents:3.4.0"
androidTestImplementation "androidx.room:room-testing:2.4.0"
androidTestImplementation "androidx.fragment:fragment-ktx:1.4.0"
androidTestImplementation "androidx.fragment:fragment-testing:1.4.0"
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"
androidTestImplementation "androidx.test.espresso:espresso-intents:3.5.1"
androidTestImplementation "androidx.room:room-testing:2.6.1"
androidTestImplementation "androidx.fragment:fragment-ktx:1.6.2"
androidTestImplementation "androidx.fragment:fragment-testing:1.6.2"

testImplementation "junit:junit:4.13.2"
testImplementation "androidx.test.ext:junit:1.1.3"
testImplementation "androidx.test.ext:junit:1.1.5"
}

ksp {
Expand Down
8 changes: 0 additions & 8 deletions sentinel/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ afterEvaluate {
password sonatype.password()
}
}
maven {
name github.name()
url github.url()
credentials {
username github.username()
password github.password()
}
}
}
publications {
release(MavenPublication) {
Expand Down
Loading

0 comments on commit d132794

Please sign in to comment.