Skip to content

Commit

Permalink
Add code quality tools (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
CAMOBAP authored Jun 24, 2022
1 parent 1b50afe commit b6288ee
Show file tree
Hide file tree
Showing 41 changed files with 971 additions and 221 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 3.1.0

- Add `pmd`, `checkstyle`, `spotbugs` tools to build system ([#40](https://github.com/hCaptcha/hcaptcha-android-sdk/issues/40))

# 3.0.0

- Add new boolean config option `HCaptchaConfig.hideDialog`.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
1 change: 1 addition & 0 deletions example-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand Down
26 changes: 26 additions & 0 deletions example-app/src/main/java/com/hcaptcha/example/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.hcaptcha.example;

import android.app.Application;
import android.os.StrictMode;

public class App extends Application {
@Override
public void onCreate() {
super.onCreate();

if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(
new StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyLog()
.build()
);
StrictMode.setVmPolicy(
new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog()
.build()
);
}
}
}
Loading

0 comments on commit b6288ee

Please sign in to comment.