File tree 7 files changed +72
-66
lines changed
androidTest/java/co/kyash/vtl
7 files changed +72
-66
lines changed Original file line number Diff line number Diff line change 1
1
apply plugin : ' com.android.application'
2
+ apply plugin : ' kotlin-android'
3
+ apply plugin : " org.jlleitschuh.gradle.ktlint"
2
4
3
5
android {
4
6
compileSdkVersion 26
7
+ dataBinding. enabled = true
8
+
5
9
defaultConfig {
6
10
applicationId " co.kyash.vtl"
7
- minSdkVersion 15
11
+ minSdkVersion 19
8
12
targetSdkVersion 26
9
13
versionCode 1
10
14
versionName " 1.0"
11
15
testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
12
16
}
13
17
buildTypes {
18
+ debug {
19
+ applicationIdSuffix ' .debug'
20
+ versionNameSuffix " -debug"
21
+ }
14
22
release {
23
+ debuggable false
24
+ zipAlignEnabled true
15
25
minifyEnabled false
16
26
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
17
27
}
18
28
}
29
+ testOptions {
30
+ unitTests. returnDefaultValues = true
31
+ }
32
+ lintOptions {
33
+ lintConfig file(' lint.xml' )
34
+ textReport true
35
+ textOutput ' stdout'
36
+ }
19
37
}
20
38
21
39
dependencies {
22
- implementation fileTree( dir : ' libs ' , include : [ ' *.jar ' ])
23
- implementation ' com.android.support:appcompat-v7:26.1.0 '
40
+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jre7: $k otlinVersion "
41
+ implementation " com.android.support:appcompat-v7:$s upportLibraryVersion "
24
42
implementation ' com.android.support.constraint:constraint-layout:1.0.2'
43
+
25
44
testImplementation ' junit:junit:4.12'
26
45
androidTestImplementation ' com.android.support.test:runner:1.0.1'
27
46
androidTestImplementation ' com.android.support.test.espresso:espresso-core:3.0.1'
28
47
}
48
+
49
+ ktlint {
50
+ version = " 0.14.0"
51
+ android = true
52
+ reporter = " checkstyle"
53
+ ignoreFailures = true
54
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ package co.kyash.vtl
2
+
3
+ import android.support.test.InstrumentationRegistry
4
+ import android.support.test.runner.AndroidJUnit4
5
+ import org.junit.Assert.assertEquals
6
+ import org.junit.Test
7
+ import org.junit.runner.RunWith
8
+
9
+ /* *
10
+ * Instrumented test, which will execute on an Android device.
11
+ *
12
+ * @see [Testing documentation](http://d.android.com/tools/testing)
13
+ */
14
+ @RunWith(AndroidJUnit4 ::class )
15
+ class ExampleInstrumentedTest {
16
+ @Test
17
+ @Throws(Exception ::class )
18
+ fun useAppContext () {
19
+ // Context of the app under test.
20
+ val appContext = InstrumentationRegistry .getTargetContext()
21
+
22
+ assertEquals(" co.kyash.vtl" , appContext.packageName)
23
+ }
24
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ package co.kyash.vtl
2
+
3
+ import android.os.Bundle
4
+ import android.support.v7.app.AppCompatActivity
5
+
6
+ class MainActivity : AppCompatActivity () {
7
+
8
+ override fun onCreate (savedInstanceState : Bundle ? ) {
9
+ super .onCreate(savedInstanceState)
10
+ setContentView(R .layout.activity_main)
11
+ }
12
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
2
-
3
1
buildscript {
4
-
2
+
3
+ ext. kotlinVersion = ' 1.2.10'
4
+ ext. supportLibraryVersion = ' 26.1.0'
5
+
5
6
repositories {
6
7
google()
7
8
jcenter()
9
+ maven { url " https://plugins.gradle.org/m2/" }
8
10
}
9
11
dependencies {
10
12
classpath ' com.android.tools.build:gradle:3.0.1'
11
-
12
-
13
- // NOTE: Do not place your application dependencies here; they belong
14
- // in the individual module build.gradle files
13
+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion "
14
+ classpath " gradle.plugin.org.jlleitschuh.gradle:ktlint-gradle:3.0.0"
15
15
}
16
16
}
17
17
You can’t perform that action at this time.
0 commit comments