diff --git a/README.md b/README.md index d24d00d..76cbdb5 100644 --- a/README.md +++ b/README.md @@ -27,20 +27,22 @@ allprojects { } ``` -Then, in your app's directory, you can include it the same way like other libraries. -Make sure that you set the comnpatibilty version to 1.8 inside `compileOptions`: +Then, in your app's directory, you can include it the same way like other libraries: ```gradle android { ... - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } + // If you face problems during building you should try including the below lines if you + // haven't already + + // compileOptions { + // sourceCompatibility JavaVersion.VERSION_1_8 + // targetCompatibility JavaVersion.VERSION_1_8 + // } } dependencies { - implementation 'com.github.vkay94:DoubleTapPlayerView:1.0.3' + implementation 'com.github.vkay94:DoubleTapPlayerView:1.0.4' } ``` @@ -54,8 +56,6 @@ into your XML layout, e.g. on top of `DoubleTapPlayerView` or inside ExoPlayer's ```xml diff --git a/app/build.gradle b/app/build.gradle index 6849877..3e940e6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,18 +32,13 @@ android { } buildTypes { release { - minifyEnabled true - shrinkResources true + minifyEnabled false + // shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - signingConfig signingConfigs.release + // signingConfig signingConfigs.release } } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - buildFeatures { viewBinding true } diff --git a/dependencies.gradle b/dependencies.gradle index 9ec4103..1b9e647 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -16,5 +16,5 @@ ext.build = [ libMajor : 1, libMinor : 0, - libPatch : 3, + libPatch : 4, ] \ No newline at end of file diff --git a/doubletapplayerview/build.gradle b/doubletapplayerview/build.gradle index 893fe24..b673f23 100644 --- a/doubletapplayerview/build.gradle +++ b/doubletapplayerview/build.gradle @@ -1,5 +1,8 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'maven-publish' +} apply from: '../dependencies.gradle' @@ -10,8 +13,6 @@ android { defaultConfig { minSdkVersion build.minSdk targetSdkVersion build.targetSdk - versionCode build.libMajor + (build.libMinor * 100) + (build.libPatch * 10000) - versionName "$build.libMajor.$build.libMinor.$build.libPatch" vectorDrawables.useSupportLibrary = true @@ -46,3 +47,21 @@ dependencies { implementation "com.google.android.exoplayer:exoplayer-ui:$versions.exoplayer" implementation "androidx.constraintlayout:constraintlayout:$versions.constraintlayout" } + +// https://ayoubbenkhemis.medium.com/publish-android-library-with-jitpack-be00a29a8174 +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + // Applies the component for the release build variant. + from components.release + + // You can then customize attributes of the publication as shown below. + groupId = 'com.github.vkay94.dtpv' + artifactId = 'doubletapplayerview' + version = build.libMajor + (build.libMinor * 100) + (build.libPatch * 10000) + } + } + } +} diff --git a/doubletapplayerview/src/main/res/layout/yt_seconds_view.xml b/doubletapplayerview/src/main/res/layout/yt_seconds_view.xml index 4bd5bf7..88d3c0a 100644 --- a/doubletapplayerview/src/main/res/layout/yt_seconds_view.xml +++ b/doubletapplayerview/src/main/res/layout/yt_seconds_view.xml @@ -14,21 +14,21 @@ android:gravity="center_horizontal" android:orientation="horizontal"> - - - -