diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index eea2eb2..6c756b0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,12 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = '1.2.61'
+ ext.kotlin_version = '1.3.11'
ext {
group = 'com.github.markusressel'
- gradle_plugin_version = '3.1.3'
+ gradle_plugin_version = '3.2.1'
minSdkVersion = 16
versionName = "0.5.0"
@@ -14,17 +14,17 @@ buildscript {
compileSdkVersion = 28
targetSdkVersion = 28
- buildToolsVersion = "27.0.3"
+ buildToolsVersion = "28.0.3"
// DEPENDENCIES
androidKtxVersion = "0.3"
- supportLibVersion = "27.1.1"
+ supportLibVersion = "28.0.0"
javaxAnnotationVersion = "10.0-b28"
- aboutlibrariesVersion = "6.0.9"
- materialdrawerVersion = "6.0.8"
- iconicsVersion = "3.0.4"
+ aboutlibrariesVersion = "6.2.0"
+ materialdrawerVersion = "6.1.1"
+ iconicsVersion = "3.1.0"
rxKotlinVersion = "2.3.0"
rxBindingVersion = "2.1.1"
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 6e2838d..49fd964 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sat Aug 25 17:52:39 CEST 2018
+#Tue Oct 23 14:05:42 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
diff --git a/library/build.gradle b/library/build.gradle
index dde0331..bc4f197 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -51,7 +51,7 @@ dependencies {
implementation "com.trello.rxlifecycle2:rxlifecycle-android-lifecycle-kotlin:$rxLifecycleVersion"
// Zoom Layout Container
- api 'com.otaliastudios:zoomlayout:1.3.0'
+ api 'com.otaliastudios:zoomlayout:1.4.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
diff --git a/library/src/main/java/de/markusressel/kodeeditor/library/view/CodeEditText.kt b/library/src/main/java/de/markusressel/kodeeditor/library/view/CodeEditText.kt
index b2c7fb4..1559402 100644
--- a/library/src/main/java/de/markusressel/kodeeditor/library/view/CodeEditText.kt
+++ b/library/src/main/java/de/markusressel/kodeeditor/library/view/CodeEditText.kt
@@ -1,7 +1,9 @@
package de.markusressel.kodeeditor.library.view
import android.content.Context
+import android.os.Build
import android.support.v7.widget.AppCompatEditText
+import android.text.Layout
import android.util.AttributeSet
import android.util.Log
import com.jakewharton.rxbinding2.widget.RxTextView
@@ -44,6 +46,10 @@ class CodeEditText : AppCompatEditText {
}
private fun reinit() {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ hyphenationFrequency = Layout.HYPHENATION_FREQUENCY_NONE
+ }
+
initSyntaxHighlighter()
}
@@ -98,7 +104,7 @@ class CodeEditText : AppCompatEditText {
}
syntaxHighlighter
- ?.highlight(text)
+ ?.apply { highlight(text!!) }
}
companion object {
diff --git a/library/src/main/java/de/markusressel/kodeeditor/library/view/CodeEditorView.kt b/library/src/main/java/de/markusressel/kodeeditor/library/view/CodeEditorView.kt
index afb7a21..7e91a0b 100644
--- a/library/src/main/java/de/markusressel/kodeeditor/library/view/CodeEditorView.kt
+++ b/library/src/main/java/de/markusressel/kodeeditor/library/view/CodeEditorView.kt
@@ -4,12 +4,14 @@ import android.content.Context
import android.content.res.TypedArray
import android.graphics.Rect
import android.graphics.drawable.Drawable
+import android.os.Build
import android.support.annotation.AttrRes
import android.support.annotation.ColorInt
import android.support.annotation.StringRes
import android.support.annotation.StyleableRes
import android.support.v4.content.ContextCompat
import android.support.v4.view.ViewCompat
+import android.text.Layout
import android.util.AttributeSet
import android.util.Log
import android.util.TypedValue
@@ -142,6 +144,9 @@ open class CodeEditorView : ZoomLayout {
contentLayout = inflater.inflate(R.layout.view_code_editor__inner_layout, null) as LinearLayout
lineNumberView = contentLayout.findViewById(R.id.codeLinesView) as TextView
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ lineNumberView.hyphenationFrequency = Layout.HYPHENATION_FREQUENCY_NONE
+ }
dividerView = contentLayout.findViewById(R.id.divider) as View
diff --git a/library/src/main/res/layout/view_code_editor__inner_layout.xml b/library/src/main/res/layout/view_code_editor__inner_layout.xml
index 6858f43..8a75354 100644
--- a/library/src/main/res/layout/view_code_editor__inner_layout.xml
+++ b/library/src/main/res/layout/view_code_editor__inner_layout.xml
@@ -29,8 +29,8 @@
android:inputType="textMultiLine|textNoSuggestions"
android:maxLength="99999999"
android:maxLines="99999999"
- android:scrollHorizontally="false"
android:scrollbars="none"
+ android:scrollHorizontally="false"
android:textSize="12sp"
android:typeface="monospace" />
diff --git a/travis/build.sh b/travis/build.sh
new file mode 100644
index 0000000..f67ec68
--- /dev/null
+++ b/travis/build.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+echo "Travis Container environment variables:"
+env | sort
+
+echo
+
+if [[ "${TRAVIS_BRANCH}" =~ "${TELEGRAM_BRANCHES}" ]]; then
+ echo "Start compiling and assembling apk..."
+ ./gradlew clean testDebug lintDebug assembleDebug --stacktrace
+else
+ echo "Start compiling WITHOUT assembling apk..."
+ ./gradlew clean testDebug lintDebug --stacktrace
+fi
+
diff --git a/travis/debug.keystore b/travis/debug.keystore
new file mode 100644
index 0000000..eaa7350
Binary files /dev/null and b/travis/debug.keystore differ
diff --git a/travis/distribute_result.sh b/travis/distribute_result.sh
new file mode 100644
index 0000000..5833f0d
--- /dev/null
+++ b/travis/distribute_result.sh
@@ -0,0 +1,62 @@
+#!/usr/bin/env bash
+if [[ "${TRAVIS_BRANCH}" =~ "${TELEGRAM_BRANCHES}" ]]; then
+ echo "Generating Telegram Messages..."
+
+ BASE_URL="https://api.telegram.org/bot${TELEGRAM_TOKEN}"
+
+ # prepare telegram message to send as reply to the apk file
+ if [[ "${TRAVIS_PULL_REQUEST}" != "false" ]]; then
+ PR_LINK_TEXT=$(cat </dev/null
+
+fi
+