Skip to content

Commit

Permalink
Update gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
hzw1199 committed May 30, 2024
1 parent 56f51de commit 37479b6
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Add the dependency in the form:

```
dependencies {
compile 'com.github.hzw1199:FloatingView:1.5.0'
compile 'com.github.hzw1199:FloatingView:1.6.0'
}
```

Expand Down
2 changes: 1 addition & 1 deletion READMEcn.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ allprojects {

```
dependencies {
compile 'com.github.hzw1199:FloatingView:1.5.0'
compile 'com.github.hzw1199:FloatingView:1.6.0'
}
```

Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 33
compileSdk 34
defaultConfig {
applicationId "com.wuadam.demo"
minSdkVersion 14
targetSdkVersion 33
minSdk 14
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:8.4.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
17 changes: 12 additions & 5 deletions floatingview/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.hzw1199'
apply from: 'maven_publish.gradle'

android {
compileSdkVersion 33
compileSdk 34


defaultConfig {
minSdkVersion 14
targetSdkVersion 33
minSdk 14
targetSdk 33
consumerProguardFiles 'proguard-rules.pro'

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand All @@ -23,6 +22,14 @@ android {
}
namespace 'com.wuadam.floatingview'

// https://developer.android.com/build/publish-library/configure-pub-variants?hl=zh-cn#single-pub-var
// https://stackoverflow.com/a/71366104
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

dependencies {
Expand Down
16 changes: 16 additions & 0 deletions floatingview/maven_publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apply plugin: 'maven-publish'

// https://developer.android.com/build/publish-library/upload-library?hl=zh-cn#create-pub
publishing {
publications {
release(MavenPublication) {
groupId = 'com.github.hzw1199'
artifactId = 'FloatingView'
version = '1.6.0'

afterEvaluate {
from components.release
}
}
}
}
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# 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.
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip

0 comments on commit 37479b6

Please sign in to comment.