From 445249a118173114621df9c498e2b150fff1cef5 Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Tue, 19 Jul 2022 16:48:47 +0900 Subject: [PATCH 01/13] Update gradle wrapper --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 936b740..fbc8a4f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ 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-7.3.3-bin.zip From 6833d7f59c2c686d5e7c71ea78d6a1e48c5347e9 Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Tue, 19 Jul 2022 17:09:46 +0900 Subject: [PATCH 02/13] Delete jcenter from dependent repository --- build.gradle | 9 +++-- library/android-artifacts.gradle | 19 +-------- library/bintray-publish.gradle | 69 -------------------------------- library/build.gradle | 20 --------- 4 files changed, 6 insertions(+), 111 deletions(-) delete mode 100644 library/bintray-publish.gradle diff --git a/build.gradle b/build.gradle index 21845f1..18d0007 100644 --- a/build.gradle +++ b/build.gradle @@ -2,11 +2,11 @@ buildscript { repositories { - jcenter() + google() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1' + classpath 'com.android.tools.build:gradle:4.2.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -15,6 +15,7 @@ buildscript { allprojects { repositories { - jcenter() + google() + mavenCentral() } } diff --git a/library/android-artifacts.gradle b/library/android-artifacts.gradle index f8d302d..c8388cf 100644 --- a/library/android-artifacts.gradle +++ b/library/android-artifacts.gradle @@ -1,24 +1,7 @@ -task androidJavadocs(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) -} - -task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { - classifier = 'javadoc' - from androidJavadocs.destinationDir -} - -task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.sourceFiles -} - task androidJar(type: Jar) { from 'build/intermediates/classes/release' } artifacts { - archives androidSourcesJar - archives androidJavadocsJar archives androidJar -} \ No newline at end of file +} diff --git a/library/bintray-publish.gradle b/library/bintray-publish.gradle deleted file mode 100644 index 3aa6e2b..0000000 --- a/library/bintray-publish.gradle +++ /dev/null @@ -1,69 +0,0 @@ -apply plugin: 'maven-publish' -apply plugin: 'com.jfrog.bintray' - -publishing { - publications { - mavenJava(MavenPublication) { - groupId GROUP - version VERSION_NAME - artifactId ARTIFACT_ID -// artifact androidJar - artifact "build/outputs/aar/library-release.aar" - artifact androidJavadocsJar - artifact androidSourcesJar - pom.withXml { - Node root = asNode() - root.appendNode('name', ARTIFACT_ID) - root.appendNode('description', POM_DESCRIPTION) - root.appendNode('url', POM_URL) - - def issues = root.appendNode('issueManagement') - issues.appendNode('system', 'github') - issues.appendNode('url', ISSUE_URL) - - def scm = root.appendNode('scm') - scm.appendNode('url', POM_SCM_URL) - scm.appendNode('connection', POM_SCM_CONNECTION) - scm.appendNode('developerConnection', POM_SCM_DEV_CONNECTION) - - def license = root.appendNode('licenses').appendNode('license') - license.appendNode('name', POM_LICENCE_NAME) - license.appendNode('url', POM_LICENCE_URL) - license.appendNode('distribution', POM_LICENCE_DIST) - - def developer = root.appendNode('developers').appendNode('developer') - developer.appendNode('id', POM_DEVELOPER_ID) - developer.appendNode('name', POM_DEVELOPER_NAME) - developer.appendNode('email', POM_DEVELOPER_EMAIL) - } - } - } -} - -def getBintrayUserProperty() { - return hasProperty('bintrayUser') ? bintrayUser : "" -} - -def getBintrayApiKeyProperty() { - return hasProperty('bintrayApiKey') ? bintrayApiKey : "" -} - -bintray { - user = bintrayUserProperty - key = bintrayApiKeyProperty - publications = ['mavenJava'] - - dryRun = false - publish = false - pkg { - repo = 'maven' - name = ARTIFACT_ID - licenses = ['Apache-2.0'] - labels = ['android'] - - version { - name = VERSION_NAME - vcsTag = VERSION_NAME - } - } -} \ No newline at end of file diff --git a/library/build.gradle b/library/build.gradle index 1237f91..ce6eff2 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -17,24 +17,4 @@ dependencies { compile 'com.android.support:appcompat-v7:23.4.0' } -android.libraryVariants.all { variant -> - if (variant.buildType.isDebuggable()) { - return; // Skip debug builds. - } - task("javadoc${variant.name.capitalize()}", type: Javadoc) { - description "Generates Javadoc for $variant.name." - source = variant.javaCompile.source - ext.androidJar = System.getenv("ANDROID_HOME") + - "/platforms/${android.compileSdkVersion}/android.jar" - classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar) - } - - task("bundleJavadoc${variant.name.capitalize()}", type: Jar) { - description "Bundles Javadoc into zip for $variant.name." - classifier = "javadoc" - from tasks["javadoc${variant.name.capitalize()}"] - } -} - apply from: 'android-artifacts.gradle' -apply from: 'bintray-publish.gradle' \ No newline at end of file From 8d2476ea2a17d21a190ea6e9bfa4dbd25c04d15d Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Tue, 19 Jul 2022 17:12:20 +0900 Subject: [PATCH 03/13] Use latest sdk --- gradle.properties | 7 +++---- library/build.gradle | 1 - sample/build.gradle | 1 - sample/src/main/AndroidManifest.xml | 3 ++- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3d29428..4fce50c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,9 +3,8 @@ VERSION_CODE=5 GROUP=com.yqritc ARTIFACT_ID=android-scalablevideoview -COMPILE_SDK_VERSION=23 -BUILD_TOOLS_VERSION=23.0.3 -TARGET_SDK_VERSION=23 +COMPILE_SDK_VERSION=31 +TARGET_SDK_VERSION=31 MIN_SDK_VERSION=14 POM_DESCRIPTION=Android texture video view having a variety of scale types @@ -19,4 +18,4 @@ POM_LICENCE_DIST=repo POM_DEVELOPER_ID=yqritc POM_DEVELOPER_NAME=yqritc POM_DEVELOPER_EMAIL=yqritc@gmail.com -ISSUE_URL=https://github.com/yqritc/Android-ScalableVideoView/issues \ No newline at end of file +ISSUE_URL=https://github.com/yqritc/Android-ScalableVideoView/issues diff --git a/library/build.gradle b/library/build.gradle index ce6eff2..52a50f8 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.library' android { compileSdkVersion COMPILE_SDK_VERSION as int - buildToolsVersion BUILD_TOOLS_VERSION defaultConfig { minSdkVersion MIN_SDK_VERSION as int diff --git a/sample/build.gradle b/sample/build.gradle index b7045e0..427d5ef 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.application' android { compileSdkVersion COMPILE_SDK_VERSION as int - buildToolsVersion BUILD_TOOLS_VERSION defaultConfig { applicationId "com.yqritc.scalablevideoview.sample" diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 7d30355..0b438bb 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -9,7 +9,8 @@ android:theme="@style/AppTheme"> + android:label="@string/app_name" + android:exported="true"> From a8c14f923e7aef7780adb558b9165dc850c3bb7c Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Tue, 19 Jul 2022 17:27:10 +0900 Subject: [PATCH 04/13] Update dependent libraries --- gradle.properties | 3 +++ library/build.gradle | 3 +-- .../com/yqritc/scalablevideoview/ScalableVideoView.java | 6 +++--- sample/build.gradle | 7 +++---- .../com/yqritc/scalablevideoview/sample/MainActivity.java | 2 +- .../yqritc/scalablevideoview/sample/SampleActivity.java | 6 +++--- .../com/yqritc/scalablevideoview/sample/SampleAdapter.java | 4 ++-- sample/src/main/res/layout/activity_sample.xml | 2 +- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4fce50c..ea0538e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,6 @@ +android.useAndroidX=true +android.enableJetifier=true + VERSION_NAME=1.0.4 VERSION_CODE=5 GROUP=com.yqritc diff --git a/library/build.gradle b/library/build.gradle index 52a50f8..8135ecb 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -12,8 +12,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.4.0' + implementation 'androidx.appcompat:appcompat:1.4.2' } apply from: 'android-artifacts.gradle' diff --git a/library/src/main/java/com/yqritc/scalablevideoview/ScalableVideoView.java b/library/src/main/java/com/yqritc/scalablevideoview/ScalableVideoView.java index 38b7112..c5a7d80 100644 --- a/library/src/main/java/com/yqritc/scalablevideoview/ScalableVideoView.java +++ b/library/src/main/java/com/yqritc/scalablevideoview/ScalableVideoView.java @@ -8,9 +8,9 @@ import android.graphics.SurfaceTexture; import android.media.MediaPlayer; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.RawRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RawRes; import android.util.AttributeSet; import android.view.Surface; import android.view.TextureView; diff --git a/sample/build.gradle b/sample/build.gradle index 427d5ef..78c143f 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -19,8 +19,7 @@ android { } dependencies { - compile project(':library') -// compile 'com.yqritc:android-scalablevideoview:1.0.4' - compile 'com.android.support:appcompat-v7:23.4.0' - compile 'com.android.support:recyclerview-v7:23.4.0' + implementation project(':library') + implementation 'androidx.recyclerview:recyclerview:1.2.1' + implementation 'androidx.appcompat:appcompat:1.4.2' } diff --git a/sample/src/main/java/com/yqritc/scalablevideoview/sample/MainActivity.java b/sample/src/main/java/com/yqritc/scalablevideoview/sample/MainActivity.java index fd852ab..d42c692 100644 --- a/sample/src/main/java/com/yqritc/scalablevideoview/sample/MainActivity.java +++ b/sample/src/main/java/com/yqritc/scalablevideoview/sample/MainActivity.java @@ -5,7 +5,7 @@ import android.media.MediaPlayer; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.view.Menu; import android.view.MenuItem; import android.view.View; diff --git a/sample/src/main/java/com/yqritc/scalablevideoview/sample/SampleActivity.java b/sample/src/main/java/com/yqritc/scalablevideoview/sample/SampleActivity.java index 20f564a..7aed6aa 100644 --- a/sample/src/main/java/com/yqritc/scalablevideoview/sample/SampleActivity.java +++ b/sample/src/main/java/com/yqritc/scalablevideoview/sample/SampleActivity.java @@ -3,9 +3,9 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.appcompat.app.AppCompatActivity; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.Menu; import android.view.MenuItem; diff --git a/sample/src/main/java/com/yqritc/scalablevideoview/sample/SampleAdapter.java b/sample/src/main/java/com/yqritc/scalablevideoview/sample/SampleAdapter.java index 80e78c4..6972a7b 100644 --- a/sample/src/main/java/com/yqritc/scalablevideoview/sample/SampleAdapter.java +++ b/sample/src/main/java/com/yqritc/scalablevideoview/sample/SampleAdapter.java @@ -5,8 +5,8 @@ import android.content.Context; import android.media.MediaPlayer; -import android.support.annotation.RawRes; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.RawRes; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/res/layout/activity_sample.xml b/sample/src/main/res/layout/activity_sample.xml index 1458f5c..db02a0c 100644 --- a/sample/src/main/res/layout/activity_sample.xml +++ b/sample/src/main/res/layout/activity_sample.xml @@ -2,7 +2,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - Date: Tue, 19 Jul 2022 17:38:17 +0900 Subject: [PATCH 05/13] Use latest android gradle plugin --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 18d0007..8229a93 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:7.0.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files From 3e8c50106f3a81a2b54a95333d02f3a53d6a5b37 Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Tue, 19 Jul 2022 17:43:53 +0900 Subject: [PATCH 06/13] Use same definition of version specify --- gradle.properties | 3 +++ library/build.gradle | 2 +- sample/build.gradle | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index ea0538e..306ba45 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,6 +10,9 @@ COMPILE_SDK_VERSION=31 TARGET_SDK_VERSION=31 MIN_SDK_VERSION=14 +APPCOMPAT_VERSION=1.4.2 +RECYCLERVIEW_VERSION=1.2.1 + POM_DESCRIPTION=Android texture video view having a variety of scale types POM_URL=https://github.com/yqritc/Android-ScalableVideoView POM_SCM_URL=git@github.com:yqritc/Android-ScalableVideoView.git diff --git a/library/build.gradle b/library/build.gradle index 8135ecb..6d21463 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -12,7 +12,7 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.4.2' + implementation "androidx.appcompat:appcompat:$APPCOMPAT_VERSION" } apply from: 'android-artifacts.gradle' diff --git a/sample/build.gradle b/sample/build.gradle index 78c143f..675cb42 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -20,6 +20,6 @@ android { dependencies { implementation project(':library') - implementation 'androidx.recyclerview:recyclerview:1.2.1' - implementation 'androidx.appcompat:appcompat:1.4.2' + implementation "androidx.recyclerview:recyclerview:$RECYCLERVIEW_VERSION" + implementation "androidx.appcompat:appcompat:$APPCOMPAT_VERSION" } From 7bda0c1796e96e402d6331d915ca667deacdb7e7 Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Tue, 19 Jul 2022 17:47:27 +0900 Subject: [PATCH 07/13] Add publish task --- library/build.gradle | 1 + library/publish.gradle | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 library/publish.gradle diff --git a/library/build.gradle b/library/build.gradle index 6d21463..76f9de4 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -16,3 +16,4 @@ dependencies { } apply from: 'android-artifacts.gradle' +apply from: 'publish.gradle' diff --git a/library/publish.gradle b/library/publish.gradle new file mode 100644 index 0000000..c833302 --- /dev/null +++ b/library/publish.gradle @@ -0,0 +1,37 @@ +apply plugin: 'maven-publish' + +publishing { + publications { + mavenJava(MavenPublication) { + groupId GROUP + version VERSION_NAME + artifactId ARTIFACT_ID + artifact "build/outputs/aar/library-release.aar" + pom.withXml { + Node root = asNode() + root.appendNode('name', ARTIFACT_ID) + root.appendNode('description', POM_DESCRIPTION) + root.appendNode('url', POM_URL) + + def issues = root.appendNode('issueManagement') + issues.appendNode('system', 'github') + issues.appendNode('url', ISSUE_URL) + + def scm = root.appendNode('scm') + scm.appendNode('url', POM_SCM_URL) + scm.appendNode('connection', POM_SCM_CONNECTION) + scm.appendNode('developerConnection', POM_SCM_DEV_CONNECTION) + + def license = root.appendNode('licenses').appendNode('license') + license.appendNode('name', POM_LICENCE_NAME) + license.appendNode('url', POM_LICENCE_URL) + license.appendNode('distribution', POM_LICENCE_DIST) + + def developer = root.appendNode('developers').appendNode('developer') + developer.appendNode('id', POM_DEVELOPER_ID) + developer.appendNode('name', POM_DEVELOPER_NAME) + developer.appendNode('email', POM_DEVELOPER_EMAIL) + } + } + } +} From 2dcf6e8b1c501921ebc7c8126ff1fbbf8506141b Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Wed, 20 Jul 2022 09:43:03 +0900 Subject: [PATCH 08/13] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92f1b52..478b5f9 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Android Texture VideoView having a variety of scale types like the scale types o # Gradle ``` repositories { - jcenter() + maven { url 'https://jitpack.io' } } dependencies { From f279b61007110f42a88bc9c8f30e7ae605110878 Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Wed, 20 Jul 2022 09:51:03 +0900 Subject: [PATCH 09/13] Modanize gradle files --- build.gradle | 22 +++++----------------- library/build.gradle | 11 +++++++---- sample/build.gradle | 12 ++++++++---- settings.gradle | 17 +++++++++++++++++ 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/build.gradle b/build.gradle index 8229a93..307de6d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,21 +1,9 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:7.0.4' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } +plugins { + id 'com.android.application' version '7.2.1' apply false + id 'com.android.library' version '7.2.1' apply false } -allprojects { - repositories { - google() - mavenCentral() - } +task clean(type: Delete) { + delete rootProject.buildDir } diff --git a/library/build.gradle b/library/build.gradle index 76f9de4..9738222 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,11 +1,14 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' +} android { - compileSdkVersion COMPILE_SDK_VERSION as int + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdkVersion MIN_SDK_VERSION as int - targetSdkVersion TARGET_SDK_VERSION as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int + versionCode VERSION_CODE as int versionName VERSION_NAME } diff --git a/sample/build.gradle b/sample/build.gradle index 675cb42..e4489c3 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,15 +1,19 @@ -apply plugin: 'com.android.application' +plugins { + id 'com.android.application' +} android { - compileSdkVersion COMPILE_SDK_VERSION as int + compileSdk COMPILE_SDK_VERSION as int defaultConfig { applicationId "com.yqritc.scalablevideoview.sample" - minSdkVersion MIN_SDK_VERSION as int - targetSdkVersion TARGET_SDK_VERSION as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int + versionCode VERSION_CODE as int versionName VERSION_NAME } + buildTypes { release { minifyEnabled false diff --git a/settings.gradle b/settings.gradle index 77c36d0..7e0dbb0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,18 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} + +rootProject.name = "Android-ScalableVideoView" include ':library', ':sample' From d2e21d7efa757623638e6da2694d4596aed1d9d8 Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Wed, 20 Jul 2022 10:11:04 +0900 Subject: [PATCH 10/13] Use version catalog --- build.gradle | 4 ++-- gradle.properties | 3 --- gradle/libs.versions.toml | 12 ++++++++++++ library/build.gradle | 2 +- sample/build.gradle | 4 ++-- settings.gradle | 2 ++ 6 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/build.gradle b/build.gradle index 307de6d..1e2b676 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.1' apply false - id 'com.android.library' version '7.2.1' apply false + alias libs.plugins.android.application apply false + alias libs.plugins.android.library apply false } task clean(type: Delete) { diff --git a/gradle.properties b/gradle.properties index 306ba45..ea0538e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,9 +10,6 @@ COMPILE_SDK_VERSION=31 TARGET_SDK_VERSION=31 MIN_SDK_VERSION=14 -APPCOMPAT_VERSION=1.4.2 -RECYCLERVIEW_VERSION=1.2.1 - POM_DESCRIPTION=Android texture video view having a variety of scale types POM_URL=https://github.com/yqritc/Android-ScalableVideoView POM_SCM_URL=git@github.com:yqritc/Android-ScalableVideoView.git diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..27d610d --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,12 @@ +[versions] +android-plugin = "7.2.1" +android-appcompat = "1.4.2" +android-recyclerview = "1.2.1" + +[libraries] +android-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "android-appcompat" } +android-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "android-recyclerview" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "android-plugin" } +android-library = { id = "com.android.library", version.ref = "android-plugin" } diff --git a/library/build.gradle b/library/build.gradle index 9738222..6c67081 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -15,7 +15,7 @@ android { } dependencies { - implementation "androidx.appcompat:appcompat:$APPCOMPAT_VERSION" + implementation libs.android.appcompat } apply from: 'android-artifacts.gradle' diff --git a/sample/build.gradle b/sample/build.gradle index e4489c3..d7b9a17 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -24,6 +24,6 @@ android { dependencies { implementation project(':library') - implementation "androidx.recyclerview:recyclerview:$RECYCLERVIEW_VERSION" - implementation "androidx.appcompat:appcompat:$APPCOMPAT_VERSION" + implementation libs.android.recyclerview + implementation libs.android.appcompat } diff --git a/settings.gradle b/settings.gradle index 7e0dbb0..79afe5f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -16,3 +16,5 @@ dependencyResolutionManagement { rootProject.name = "Android-ScalableVideoView" include ':library', ':sample' + +enableFeaturePreview("VERSION_CATALOGS") From b3b246aa405e51da8d4ddac3daebef796f27c67b Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Wed, 20 Jul 2022 10:16:46 +0900 Subject: [PATCH 11/13] Define sdk in version catalog --- gradle.properties | 4 ---- gradle/libs.versions.toml | 4 ++++ library/build.gradle | 6 +++--- sample/build.gradle | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index ea0538e..b6c5cdb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,10 +6,6 @@ VERSION_CODE=5 GROUP=com.yqritc ARTIFACT_ID=android-scalablevideoview -COMPILE_SDK_VERSION=31 -TARGET_SDK_VERSION=31 -MIN_SDK_VERSION=14 - POM_DESCRIPTION=Android texture video view having a variety of scale types POM_URL=https://github.com/yqritc/Android-ScalableVideoView POM_SCM_URL=git@github.com:yqritc/Android-ScalableVideoView.git diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 27d610d..fcf324e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,4 +1,8 @@ [versions] +sdk-compile = "31" +sdk-min = "14" +sdk-target = "31" + android-plugin = "7.2.1" android-appcompat = "1.4.2" android-recyclerview = "1.2.1" diff --git a/library/build.gradle b/library/build.gradle index 6c67081..25f59c5 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -3,11 +3,11 @@ plugins { } android { - compileSdk COMPILE_SDK_VERSION as int + compileSdk libs.versions.sdk.compile.get() as int defaultConfig { - minSdk MIN_SDK_VERSION as int - targetSdk TARGET_SDK_VERSION as int + minSdk libs.versions.sdk.min.get() as int + targetSdk libs.versions.sdk.target.get() as int versionCode VERSION_CODE as int versionName VERSION_NAME diff --git a/sample/build.gradle b/sample/build.gradle index d7b9a17..656722a 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -3,12 +3,12 @@ plugins { } android { - compileSdk COMPILE_SDK_VERSION as int + compileSdk libs.versions.sdk.compile.get() as int defaultConfig { applicationId "com.yqritc.scalablevideoview.sample" - minSdk MIN_SDK_VERSION as int - targetSdk TARGET_SDK_VERSION as int + minSdk libs.versions.sdk.min.get() as int + targetSdk libs.versions.sdk.target.get() as int versionCode VERSION_CODE as int versionName VERSION_NAME From 5ded9076e6d20a0e468ab3f8bee3ae0313c6be4d Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Wed, 20 Jul 2022 10:18:01 +0900 Subject: [PATCH 12/13] Separate version code and name between app and library --- sample/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/build.gradle b/sample/build.gradle index 656722a..4efdfc3 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -10,8 +10,8 @@ android { minSdk libs.versions.sdk.min.get() as int targetSdk libs.versions.sdk.target.get() as int - versionCode VERSION_CODE as int - versionName VERSION_NAME + versionCode 1 + versionName "1.0.0" } buildTypes { From 089579b2624245a60036687ce11bf9c2dc46b358 Mon Sep 17 00:00:00 2001 From: Tomoki Yamashita Date: Wed, 20 Jul 2022 10:21:34 +0900 Subject: [PATCH 13/13] Version up to v1.0.5 --- README.md | 2 +- gradle.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 478b5f9..35312bc 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ repositories { } dependencies { - compile 'com.yqritc:android-scalablevideoview:1.0.4' + compile 'com.yqritc:android-scalablevideoview:1.0.5' } ``` diff --git a/gradle.properties b/gradle.properties index b6c5cdb..46237e5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ android.useAndroidX=true android.enableJetifier=true -VERSION_NAME=1.0.4 -VERSION_CODE=5 +VERSION_NAME=1.0.5 +VERSION_CODE=6 GROUP=com.yqritc ARTIFACT_ID=android-scalablevideoview