From 186384acaa805623408f172e89eac3f295f8a219 Mon Sep 17 00:00:00 2001 From: sherlock Date: Mon, 13 Jan 2025 11:35:38 +0800 Subject: [PATCH] fix: downgrade java 11 --- README.md | 4 ++-- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- library/build.gradle | 5 ++--- .../cc/shinichi/library/view/ImagePreviewActivity.kt | 6 +----- sample/build.gradle | 11 +++++------ 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b89b33e..a77b883 100755 --- a/README.md +++ b/README.md @@ -48,11 +48,11 @@ https://github.com/user-attachments/assets/070caa63-8e9f-4b11-9240-4cb56440d3c2 } ``` #### Step 2. 在你app的build.gradle中添加依赖: -当前最新版本为:```androidx-8.1.2``` +当前最新版本为:```androidx-8.1.3``` ``` dependencies { // 本框架 - implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-8.1.2' + implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-8.1.3' // glide implementation 'com.github.bumptech.glide:glide:4.16.0' diff --git a/build.gradle b/build.gradle index 3d794f0..ea8280a 100755 --- 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. buildscript { - ext.kotlin_version = '1.9.20' + ext.kotlin_version = '1.7.10' repositories { mavenLocal() @@ -10,7 +10,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.7.2' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2192624..23d9606 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Oct 16 14:46:01 CST 2020 +#Mon Jan 13 11:21:01 CST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip diff --git a/library/build.gradle b/library/build.gradle index 2687cde..6b56cb0 100755 --- a/library/build.gradle +++ b/library/build.gradle @@ -4,10 +4,9 @@ apply plugin: 'kotlin-android' android { namespace 'cc.shinichi.library' compileSdkVersion 34 - buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 24 - targetSdkVersion 34 + targetSdkVersion 33 multiDexEnabled true } buildTypes { @@ -27,7 +26,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'com.google.android.material:material:1.5.0' implementation 'androidx.exifinterface:exifinterface:1.3.5' - implementation "androidx.core:core-ktx:1.7.0" + implementation "androidx.core:core-ktx:1.6.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" // glide diff --git a/library/src/main/java/cc/shinichi/library/view/ImagePreviewActivity.kt b/library/src/main/java/cc/shinichi/library/view/ImagePreviewActivity.kt index 523547d..6ac48ef 100755 --- a/library/src/main/java/cc/shinichi/library/view/ImagePreviewActivity.kt +++ b/library/src/main/java/cc/shinichi/library/view/ImagePreviewActivity.kt @@ -92,11 +92,7 @@ class ImagePreviewActivity : AppCompatActivity(), Handler.Callback, View.OnClick override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { - overrideActivityTransition(OVERRIDE_TRANSITION_OPEN, R.anim.fade_in, R.anim.fade_out) - } else { - overridePendingTransition(R.anim.fade_in, R.anim.fade_out) - } + overridePendingTransition(R.anim.fade_in, R.anim.fade_out) parentView = View.inflate(this, ImagePreview.instance.previewLayoutResId, null) setContentView(parentView) diff --git a/sample/build.gradle b/sample/build.gradle index 432a4a1..e0f7948 100755 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -18,13 +18,12 @@ android { } namespace 'cc.shinichi.bigimageviewpager' compileSdkVersion 34 - buildToolsVersion '34.0.0' defaultConfig { applicationId "cc.shinichi.bigimageviewpager" minSdkVersion 24 - targetSdkVersion 34 - versionCode 812 - versionName "androidx-8.1.2" + targetSdkVersion 33 + versionCode 813 + versionName "androidx-8.1.3" signingConfig signingConfigs.debug multiDexEnabled true } @@ -61,7 +60,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'com.google.android.material:material:1.5.0' implementation 'androidx.recyclerview:recyclerview:1.2.1' - implementation "androidx.core:core-ktx:1.7.0" + implementation "androidx.core:core-ktx:1.6.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" // PictureSelector basic (Necessary) @@ -79,6 +78,6 @@ dependencies { implementation "androidx.media3:media3-ui:1.4.1" // library - // implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-8.1.2' + // implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-8.1.3' implementation project(':library') } \ No newline at end of file