aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-09 00:24:40 -0700
committerAllan Wang <me@allanwang.ca>2017-07-09 00:24:40 -0700
commit40d6788abfa46ac99f46b32fd4aeb78e67c3b6f6 (patch)
tree523f72bd0c53817815fd0ab1aa7c3124a3264745 /kpref-activity
parentbcc7dd36752829b650b583fd6ee6168de3e6f95a (diff)
downloadkau-40d6788abfa46ac99f46b32fd4aeb78e67c3b6f6.tar.gz
kau-40d6788abfa46ac99f46b32fd4aeb78e67c3b6f6.tar.bz2
kau-40d6788abfa46ac99f46b32fd4aeb78e67c3b6f6.zip
Clean up gradle and test build
Diffstat (limited to 'kpref-activity')
-rw-r--r--kpref-activity/build.gradle46
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt3
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt2
11 files changed, 14 insertions, 53 deletions
diff --git a/kpref-activity/build.gradle b/kpref-activity/build.gradle
index 31d0a70..dac2b69 100644
--- a/kpref-activity/build.gradle
+++ b/kpref-activity/build.gradle
@@ -1,45 +1,7 @@
-plugins {
- id 'com.gladed.androidgitversion' version '0.3.4'
-}
-
-apply plugin: 'com.android.library'
-apply plugin: 'kotlin-android'
-apply plugin: 'com.github.dcendents.android-maven'
-
-group = project.APP_GROUP
+apply from: '../android.gradle'
android {
- compileSdkVersion Integer.parseInt(project.TARGET_SDK)
- buildToolsVersion project.BUILD_TOOLS
-
- androidGitVersion {
- codeFormat = 'MMNNPPBB'
- prefix 'v'
- }
-
- defaultConfig {
- minSdkVersion Integer.parseInt(project.MIN_SDK)
- targetSdkVersion Integer.parseInt(project.TARGET_SDK)
- versionCode androidGitVersion.code()
- versionName androidGitVersion.name()
- consumerProguardFiles 'progress-proguard.txt'
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- lintOptions {
- abortOnError false
- checkReleaseBuilds false
- }
- resourcePrefix "kau_pref"
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- test.java.srcDirs += 'src/test/kotlin'
- }
+ resourcePrefix "kau_"
}
dependencies {
@@ -53,8 +15,8 @@ dependencies {
compile project(':adapter')
compile project(':colorpicker')
- compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
+ compile "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN}"
+ testCompile "org.jetbrains.kotlin:kotlin-test-junit:${KOTLIN}"
}
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
index be8fad8..b978a6e 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
@@ -11,7 +11,6 @@ import android.view.animation.Animation
import android.view.animation.AnimationUtils
import android.widget.FrameLayout
import android.widget.ViewAnimator
-import ca.allanwang.kau.R
import ca.allanwang.kau.kpref.activity.items.KPrefItemCore
import ca.allanwang.kau.ui.views.RippleCanvas
import ca.allanwang.kau.ui.widgets.TextSlider
@@ -55,7 +54,7 @@ abstract class KPrefActivity : AppCompatActivity(), KPrefActivityContract {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
//setup layout
- setContentView(R.layout.kau_activity_kpref)
+ setContentView(R.layout.kau_pref_activity)
setSupportActionBar(toolbar)
if (supportActionBar != null)
with(supportActionBar!!) {
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt
index b7ccc69..baefba7 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt
@@ -2,7 +2,7 @@ package ca.allanwang.kau.kpref.activity.items
import android.view.View
import android.widget.CheckBox
-import ca.allanwang.kau.R
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.utils.tint
/**
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt
index 38008f3..83d886d 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt
@@ -1,12 +1,12 @@
package ca.allanwang.kau.kpref.activity.items
import android.view.View
-import ca.allanwang.kau.R
import ca.allanwang.kau.colorpicker.CircleView
import ca.allanwang.kau.colorpicker.ColorBuilder
import ca.allanwang.kau.colorpicker.ColorContract
import ca.allanwang.kau.colorpicker.colorPickerDialog
import ca.allanwang.kau.kpref.activity.GlobalOptions
+import ca.allanwang.kau.kpref.activity.R
/**
* Created by Allan Wang on 2017-06-07.
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt
index 009caba..e0eb37a 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt
@@ -1,7 +1,7 @@
package ca.allanwang.kau.kpref.activity.items
import android.view.View
-import ca.allanwang.kau.R
+import ca.allanwang.kau.kpref.activity.R
/**
* Created by Allan Wang on 2017-06-07.
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt
index d7133c1..ac54cb0 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt
@@ -2,7 +2,7 @@ package ca.allanwang.kau.kpref.activity.items
import android.support.annotation.CallSuper
import android.view.View
-import ca.allanwang.kau.R
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.activity.GlobalOptions
import ca.allanwang.kau.utils.resolveDrawable
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
index fdda464..61d5ea3 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
@@ -11,7 +11,7 @@ import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
-import ca.allanwang.kau.R
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
import ca.allanwang.kau.kpref.activity.GlobalOptions
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt
index dd58cd5..c0afe13 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt
@@ -1,7 +1,7 @@
package ca.allanwang.kau.kpref.activity.items
import android.view.View
-import ca.allanwang.kau.R
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.activity.GlobalOptions
/**
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
index 522ba7c..6ca7fcd 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
@@ -3,7 +3,7 @@ package ca.allanwang.kau.kpref.activity.items
import android.view.View
import android.widget.SeekBar
import android.widget.TextView
-import ca.allanwang.kau.R
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.KPrefException
import ca.allanwang.kau.kpref.activity.GlobalOptions
import ca.allanwang.kau.utils.tint
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt
index 509394c..9081ec8 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt
@@ -1,7 +1,7 @@
package ca.allanwang.kau.kpref.activity.items
import android.view.View
-import ca.allanwang.kau.R
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.activity.GlobalOptions
import ca.allanwang.kau.kpref.activity.KPrefAdapterBuilder
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
index 33510c3..a1603ce 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
@@ -2,7 +2,7 @@ package ca.allanwang.kau.kpref.activity.items
import android.view.View
import android.widget.TextView
-import ca.allanwang.kau.R
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.activity.GlobalOptions
import ca.allanwang.kau.utils.toast