diff --git a/README.md b/README.md index f5af981..b7c9ca7 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,27 @@ # ZPHTabLayout + Simple Tablayout. Mostly use for bottom navigation -Step 1. Add the JitPack repository to your build file +## Step 1. Add the JitPack repository to your build file - allprojects { - repositories { - ... - maven { url 'https://jitpack.io' } - } +``` +allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } } +} +``` -Step 2. Add the dependency +## Step 2. Add the dependency - dependencies { - compile 'com.github.zeropercenthappy:ZPHTabLayout:1.0.2' - } +``` +dependencies { + implementation 'com.github.zeropercenthappy:ZPHTabLayout:1.0.3' +} +``` + +## Usage -TODO: USAGE +see sample \ No newline at end of file diff --git a/build.gradle b/build.gradle index 637a55e..02bf494 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,15 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.2.41' - ext.anko_version = '0.10.5' + ext.android_support_version = '27.1.1' + ext.kotlin_version = '1.3.21' + ext.anko_version = '0.10.8' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.3' + classpath 'com.android.tools.build:gradle:3.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d04996a..ace0e8f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed May 30 14:55:12 CST 2018 +#Thu Feb 21 15:43:28 CST 2019 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.10.1-all.zip diff --git a/sample/build.gradle b/sample/build.gradle index 6bc577f..7f3fc99 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -28,11 +28,14 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support.constraint:constraint-layout:1.1.2' + implementation "com.android.support:appcompat-v7:$android_support_version" + implementation 'com.android.support.constraint:constraint-layout:1.1.3' + + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - implementation project(':library') + + implementation project(':tablayoutlibrary') } diff --git a/settings.gradle b/settings.gradle index 77c36d0..46dc178 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -include ':library', ':sample' +include ':tablayoutlibrary', ':sample' diff --git a/library/.gitignore b/tablayoutlibrary/.gitignore similarity index 100% rename from library/.gitignore rename to tablayoutlibrary/.gitignore diff --git a/library/build.gradle b/tablayoutlibrary/build.gradle similarity index 82% rename from library/build.gradle rename to tablayoutlibrary/build.gradle index 629da34..806cfa5 100644 --- a/library/build.gradle +++ b/tablayoutlibrary/build.gradle @@ -24,12 +24,14 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation "com.android.support:appcompat-v7:$android_support_version" + testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation "org.jetbrains.anko:anko-common:$anko_version" + + api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + api "org.jetbrains.anko:anko-common:$anko_version" } task sourcesJar(type: Jar) { diff --git a/library/proguard-rules.pro b/tablayoutlibrary/proguard-rules.pro similarity index 100% rename from library/proguard-rules.pro rename to tablayoutlibrary/proguard-rules.pro diff --git a/library/src/androidTest/java/com/zeropercenthappy/tablayoutlibrary/ExampleInstrumentedTest.java b/tablayoutlibrary/src/androidTest/java/com/zeropercenthappy/tablayoutlibrary/ExampleInstrumentedTest.java similarity index 100% rename from library/src/androidTest/java/com/zeropercenthappy/tablayoutlibrary/ExampleInstrumentedTest.java rename to tablayoutlibrary/src/androidTest/java/com/zeropercenthappy/tablayoutlibrary/ExampleInstrumentedTest.java diff --git a/library/src/main/AndroidManifest.xml b/tablayoutlibrary/src/main/AndroidManifest.xml similarity index 100% rename from library/src/main/AndroidManifest.xml rename to tablayoutlibrary/src/main/AndroidManifest.xml diff --git a/library/src/main/java/com/zeropercenthappy/tablayoutlibrary/OnTabSelectListener.kt b/tablayoutlibrary/src/main/java/com/zeropercenthappy/tablayoutlibrary/OnTabSelectListener.kt similarity index 100% rename from library/src/main/java/com/zeropercenthappy/tablayoutlibrary/OnTabSelectListener.kt rename to tablayoutlibrary/src/main/java/com/zeropercenthappy/tablayoutlibrary/OnTabSelectListener.kt diff --git a/library/src/main/java/com/zeropercenthappy/tablayoutlibrary/TabItem.kt b/tablayoutlibrary/src/main/java/com/zeropercenthappy/tablayoutlibrary/TabItem.kt similarity index 100% rename from library/src/main/java/com/zeropercenthappy/tablayoutlibrary/TabItem.kt rename to tablayoutlibrary/src/main/java/com/zeropercenthappy/tablayoutlibrary/TabItem.kt diff --git a/library/src/main/java/com/zeropercenthappy/tablayoutlibrary/ZPHTabLayout.kt b/tablayoutlibrary/src/main/java/com/zeropercenthappy/tablayoutlibrary/ZPHTabLayout.kt similarity index 100% rename from library/src/main/java/com/zeropercenthappy/tablayoutlibrary/ZPHTabLayout.kt rename to tablayoutlibrary/src/main/java/com/zeropercenthappy/tablayoutlibrary/ZPHTabLayout.kt diff --git a/library/src/main/java/com/zeropercenthappy/tablayoutlibrary/ZPHTabLayoutConfig.kt b/tablayoutlibrary/src/main/java/com/zeropercenthappy/tablayoutlibrary/ZPHTabLayoutConfig.kt similarity index 100% rename from library/src/main/java/com/zeropercenthappy/tablayoutlibrary/ZPHTabLayoutConfig.kt rename to tablayoutlibrary/src/main/java/com/zeropercenthappy/tablayoutlibrary/ZPHTabLayoutConfig.kt diff --git a/library/src/main/res/values/attr.xml b/tablayoutlibrary/src/main/res/values/attr.xml similarity index 100% rename from library/src/main/res/values/attr.xml rename to tablayoutlibrary/src/main/res/values/attr.xml diff --git a/library/src/main/res/values/strings.xml b/tablayoutlibrary/src/main/res/values/strings.xml similarity index 100% rename from library/src/main/res/values/strings.xml rename to tablayoutlibrary/src/main/res/values/strings.xml diff --git a/library/src/test/java/com/zeropercenthappy/tablayoutlibrary/ExampleUnitTest.java b/tablayoutlibrary/src/test/java/com/zeropercenthappy/tablayoutlibrary/ExampleUnitTest.java similarity index 100% rename from library/src/test/java/com/zeropercenthappy/tablayoutlibrary/ExampleUnitTest.java rename to tablayoutlibrary/src/test/java/com/zeropercenthappy/tablayoutlibrary/ExampleUnitTest.java