Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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.6.0"
ext.kotlin_version="1.8.22"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kotlin 版本不建议升级,不然如果 APP kotlin 低于 1.8.22,那么就会无法引入这个库了。

repositories {
google()
mavenCentral()
Expand All @@ -10,9 +10,8 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.android.tools.build:gradle:8.13.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jlleitschuh.gradle:ktlint-gradle:10.0.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
29 changes: 14 additions & 15 deletions filepicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ apply plugin: 'maven-publish'
group='com.github.rosuH'

android {
namespace 'me.rosuh.filepicker'
defaultConfig {
minSdkVersion 16
compileSdk 33
targetSdkVersion 33
minSdkVersion 21
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minSdkVersion 也尽量不要调整。

compileSdk 35

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}

Expand All @@ -28,8 +28,8 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同理,这里也不需要调整~

targetCompatibility JavaVersion.VERSION_17
}
}

Expand All @@ -49,18 +49,17 @@ afterEvaluate {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly 'com.squareup.picasso:picasso:2.5.2'
compileOnly ("com.github.bumptech.glide:glide:4.9.0") {
compileOnly 'com.squareup.picasso:picasso:2.71828'
compileOnly ('com.github.bumptech.glide:glide:5.0.5') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glide 尽量不要调整太高。

exclude group: "com.android.support"
}
def kotlin_version = '1.6.0'
def kotlin_version = '1.8.22'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.appcompat:appcompat:1.7.1'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同理。作为一个库,不应该依赖太高版本的第三方库。不然会影响宿主 APP 的编译。

implementation 'androidx.recyclerview:recyclerview:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
testImplementation 'junit:junit:4.13.2'
// Removed androidTest dependencies to avoid minSdk conflicts in library module
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class PicassoEngine : ImageEngine {
placeholder: Int
) {
if (url?.startsWith("http") == true) {
Picasso.with(context)
Picasso.get()
.load(url)
.placeholder(placeholder)
.into(imageView)
} else {
Picasso.with(context)
Picasso.get()
.load(File(url))
.placeholder(placeholder)
.into(imageView)
Expand Down
57 changes: 0 additions & 57 deletions filepicker/src/main/res/values-v21/styles.xml

This file was deleted.

17 changes: 11 additions & 6 deletions filepicker/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<resources>

<style name="FilePickerThemeRail" parent="Theme.AppCompat.Light.NoActionBar">
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="FilePickerTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item
name="android:windowOptOutEdgeToEdgeEnforcement"
tools:targetApi="35">true
</item>
</style>
<style name="FilePickerThemeRail" parent="FilePickerTheme">
<item name="colorPrimary">@color/rail_color_primary</item>
<item name="colorPrimaryDark">@color/rail_color_primary_dark</item>
<item name="colorAccent">@color/rail_color_accent</item>
Expand All @@ -15,7 +20,7 @@


<!--https://material.io/design/material-studies/reply.html#-->
<style name="FilePickerThemeReply" parent="Theme.AppCompat.Light.NoActionBar">
<style name="FilePickerThemeReply" parent="FilePickerTheme">
<item name="colorPrimary">@color/reply_color_primary</item>
<item name="colorPrimaryDark">@color/reply_color_primary_dark</item>
<item name="colorAccent">@color/reply_color_accent</item>
Expand All @@ -29,7 +34,7 @@
</style>

<!--https://material.io/design/material-studies/crane.html#about-crane-->
<style name="FilePickerThemeCrane" parent="Theme.AppCompat.Light.NoActionBar">
<style name="FilePickerThemeCrane" parent="FilePickerTheme">
<item name="colorPrimary">@color/crane_color_primary</item>
<item name="colorPrimaryDark">@color/crane_color_primary_dark</item>
<item name="colorAccent">@color/crane_color_accent</item>
Expand All @@ -42,7 +47,7 @@
<item name="background">@drawable/btn_selector_file_picker_crane</item>
</style>
<!--https://material.io/design/material-studies/shrine.html#about-shrine-->
<style name="FilePickerThemeShrine" parent="Theme.AppCompat.Light.NoActionBar">
<style name="FilePickerThemeShrine" parent="FilePickerTheme">
<item name="colorPrimary">@color/shrine_color_primary</item>
<item name="colorPrimaryDark">@color/shrine_color_primary_dark</item>
<item name="colorAccent">@color/shrine_color_accent</item>
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# JVM arguments for Gradle 8.5 with JDK 21
org.gradle.jvmargs=-Xmx2048m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Sep 16 10:42:32 CST 2020
#Mon Oct 06 22:17:01 CST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
Loading