From bafc3ded8d58974557b58c407aca17d60223c406 Mon Sep 17 00:00:00 2001 From: b1uec0in Date: Sat, 9 Sep 2017 15:35:13 +0900 Subject: [PATCH] Fixed build error issue on sdk 26. Changed "font" attribute name to "fontType". --- build.gradle | 12 ++++++++++-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- sample/build.gradle | 8 ++++---- sample/src/main/res/layout/activity_sample.xml | 6 +++--- typekit/build.gradle | 8 ++++---- .../java/com/tsengvn/typekit/TypekitFactory.java | 2 +- typekit/src/main/res/values/attrs.xml | 2 +- 7 files changed, 25 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index fa01603..f962654 100644 --- a/build.gradle +++ b/build.gradle @@ -5,13 +5,21 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.2' + classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } +allprojects { + repositories { + jcenter() + maven { + url "https://maven.google.com" + } + } +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5f92ff5..9ceb309 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jul 05 11:53:35 ICT 2016 +#Sat Sep 09 15:10:31 KST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/sample/build.gradle b/sample/build.gradle index addfcc1..19db96c 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 22 - buildToolsVersion "21.1.2" + compileSdkVersion 26 + buildToolsVersion "26.0.1" defaultConfig { applicationId "com.tsengvn.typekitsample" - minSdkVersion 10 + minSdkVersion 14 targetSdkVersion 22 versionCode 1 versionName "1.0" @@ -28,6 +28,6 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' + compile 'com.android.support:appcompat-v7:26.0.1' compile project(path: ':typekit') } diff --git a/sample/src/main/res/layout/activity_sample.xml b/sample/src/main/res/layout/activity_sample.xml index 5875695..a66d231 100644 --- a/sample/src/main/res/layout/activity_sample.xml +++ b/sample/src/main/res/layout/activity_sample.xml @@ -50,7 +50,7 @@ android:text="soopafre" android:textColor="@android:color/black" android:textSize="18sp" - app:font="custom1"/> + app:fontType="custom1"/> + app:fontType="custom2"/> + app:fontType="disney"/> \ No newline at end of file diff --git a/typekit/build.gradle b/typekit/build.gradle index 3f7625e..03af905 100644 --- a/typekit/build.gradle +++ b/typekit/build.gradle @@ -35,7 +35,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.1.2' + classpath 'com.android.tools.build:gradle:2.3.3' } } @@ -43,12 +43,12 @@ android { signingConfigs { } compileSdkVersion 22 - buildToolsVersion "21.1.2" + buildToolsVersion "26.0.1" defaultConfig { minSdkVersion 10 targetSdkVersion 22 - versionCode 2 - versionName "1.0.1" + versionCode 3 + versionName "1.0.2" } buildTypes { release { diff --git a/typekit/src/main/java/com/tsengvn/typekit/TypekitFactory.java b/typekit/src/main/java/com/tsengvn/typekit/TypekitFactory.java index 2d3f76a..67f57d0 100644 --- a/typekit/src/main/java/com/tsengvn/typekit/TypekitFactory.java +++ b/typekit/src/main/java/com/tsengvn/typekit/TypekitFactory.java @@ -54,7 +54,7 @@ private void applyFontForTextView(Context context, AttributeSet attrs, TextView Typekit typekit = Typekit.getInstance(); TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.Typekit); - String fontKey = (array != null) ? array.getString(R.styleable.Typekit_font) : null; + String fontKey = (array != null) ? array.getString(R.styleable.Typekit_fontType) : null; if (!TextUtils.isEmpty(fontKey)) { textView.setTypeface(typekit.get(fontKey)); diff --git a/typekit/src/main/res/values/attrs.xml b/typekit/src/main/res/values/attrs.xml index b111d3c..d4262ff 100644 --- a/typekit/src/main/res/values/attrs.xml +++ b/typekit/src/main/res/values/attrs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file