summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-03-12 13:35:00 -0300
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-03-12 13:35:00 -0300
commit0048a0e03ab8379e00eef55a871234f0aabc31ca (patch)
tree305d6dbb0a226b11d157a754538b26a5e5ab5f05
parent2bf55fd253abf427ed725d6722349a43d9c14eea (diff)
parenta0d67ee66e7a58a7c82dc29161b6093803034996 (diff)
downloadmullvadvpn-0048a0e03ab8379e00eef55a871234f0aabc31ca.tar.xz
mullvadvpn-0048a0e03ab8379e00eef55a871234f0aabc31ca.zip
Merge remote-tracking branch 'kotlin-linter'
-rw-r--r--android/build.gradle26
-rw-r--r--android/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--android/src/main/AndroidManifest.xml4
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/MainActivity.kt2
-rw-r--r--android/src/main/res/mipmap-hdpi/ic_launcher_round.pngbin4409 -> 0 bytes
-rw-r--r--android/src/main/res/mipmap-mdpi/ic_launcher_round.pngbin2684 -> 0 bytes
-rw-r--r--android/src/main/res/mipmap-xhdpi/ic_launcher_round.pngbin5942 -> 0 bytes
-rw-r--r--android/src/main/res/mipmap-xxhdpi/ic_launcher_round.pngbin9685 -> 0 bytes
-rw-r--r--android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.pngbin13067 -> 0 bytes
9 files changed, 30 insertions, 4 deletions
diff --git a/android/build.gradle b/android/build.gradle
index 5fd0470c67..2559316d8e 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,3 +1,6 @@
+import org.jmailen.gradle.kotlinter.tasks.FormatTask
+import org.jmailen.gradle.kotlinter.tasks.LintTask
+
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
@@ -34,10 +37,29 @@ buildscript {
repositories {
jcenter()
google()
+
+ maven {
+ url = uri("https://plugins.gradle.org/m2/")
+ }
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.2.0'
- classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71'
+ classpath 'com.android.tools.build:gradle:3.3.2'
+ classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20'
+ classpath 'org.jmailen.gradle:kotlinter-gradle:1.22.0'
}
}
+
+task lintKotlin(type: LintTask, group: 'verification') {
+ source files('src/main/kotlin')
+ reports = [
+ 'plain': file('build/reports/kotlin-lint-report.txt'),
+ ]
+}
+
+task format(type: FormatTask, group: 'formatting') {
+ source files('src/main/kotlin')
+ report file('build/reports/kotlin-format-report.txt')
+}
+
+lint.dependsOn lintKotlin
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 3f0f9be633..7919ae6e6b 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index d2a34d9077..2836f3d63a 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -1,12 +1,16 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
package="net.mullvad.mullvadvpn"
>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="@mipmap/ic_launcher"
+ android:roundIcon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
+ android:allowBackup="false"
+ tools:ignore="GoogleAppIndexingWarning"
>
<activity
android:name=".MainActivity"
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/MainActivity.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/MainActivity.kt
index 97d87a264a..b05f4df3b1 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/MainActivity.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/MainActivity.kt
@@ -3,7 +3,7 @@ package net.mullvad.mullvadvpn
import android.os.Bundle
import android.support.v4.app.FragmentActivity
-class MainActivity: FragmentActivity() {
+class MainActivity : FragmentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.main)
diff --git a/android/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index ecdaeebbe5..0000000000
--- a/android/src/main/res/mipmap-hdpi/ic_launcher_round.png
+++ /dev/null
Binary files differ
diff --git a/android/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index 84aa8cf767..0000000000
--- a/android/src/main/res/mipmap-mdpi/ic_launcher_round.png
+++ /dev/null
Binary files differ
diff --git a/android/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index 8809e8615b..0000000000
--- a/android/src/main/res/mipmap-xhdpi/ic_launcher_round.png
+++ /dev/null
Binary files differ
diff --git a/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index 623363c03a..0000000000
--- a/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
+++ /dev/null
Binary files differ
diff --git a/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index c3c8f0f43d..0000000000
--- a/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
+++ /dev/null
Binary files differ