Browse Source

发布maven0.0.1

JonaNorman 1 year ago
parent
commit
6065c04213
7 changed files with 46 additions and 2 deletions
  1. 15 0
      README-EN.md
  2. 15 0
      README.md
  3. 2 0
      app/build.gradle
  4. 6 0
      build.gradle
  5. 1 0
      download-source/build.gradle
  6. 3 1
      gradle.properties
  7. 4 1
      publish.gradle

+ 15 - 0
README-EN.md

@@ -26,6 +26,21 @@ After a successful upgrade, the package name of the WebView kernel changes to `c
 
 <img src="/preview/webview_can_play_h265.jpg" width="400px">
 
+# implementation
+```gradle
+implementation 'io.github.jonanorman.android.webviewup:core:0.1.0'// 不需要下载APK时使用
+implementation 'io.github.jonanorman.android.webviewup:download-source:0.1.0'// 需要下载APK使用
+```
+
+```java
+            UpgradeDownloadSource  upgradeSource = new UpgradeDownloadSource(
+                    context,
+                    url,
+                    file
+            );
+            WebViewUpgrade.upgrade(upgradeSource);
+```
+
 ## Compatibility
 
 Android devices vary greatly. The following features and device models have been tested. Contributions through issue submissions and Merge Requests to this project are welcomed.

+ 15 - 0
README.md

@@ -25,6 +25,21 @@ WebView内核选择页面如下图所示
 
 <img src="/preview/webview_can_play_h265.jpg" width="400px">
 
+# 使用
+```gradle
+implementation 'io.github.jonanorman.android.webviewup:core:0.1.0'
+implementation 'io.github.jonanorman.android.webviewup:download-source:0.1.0'
+```
+
+```java
+            UpgradeDownloadSource  upgradeSource = new UpgradeDownloadSource(
+                    context,
+                    url,
+                    file
+            );
+            WebViewUpgrade.upgrade(upgradeSource);
+```
+
 # 兼容性
 
 Android的设备五花八门,已测试以下功能和机型,欢迎大家提issue和Merge Request加入到这个项目中来,有疑惑可以扫码加群,如果二维码显示过期了,可以搜索微信号JonaNorman加我个人微信拉你进群(请备注WebView升级)

+ 2 - 0
app/build.gradle

@@ -60,6 +60,8 @@ android {
 
 dependencies {
     implementation 'androidx.appcompat:appcompat:1.3.0'
+//    implementation 'io.github.jonanorman.android.webviewup:core:0.1.0'
+//    implementation 'io.github.jonanorman.android.webviewup:download-source:0.1.0'
     implementation project(":core")
     implementation project(':download-source')
 

+ 6 - 0
build.gradle

@@ -12,6 +12,12 @@ allprojects {
     repositories {
         mavenCentral()
         google()
+        maven {
+            url 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
+        }
+        maven {
+            url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
+        }
     }
 }
 

+ 1 - 0
download-source/build.gradle

@@ -25,6 +25,7 @@ android {
 
 dependencies {
     compileOnly project(":core")
+//    compileOnly 'io.github.jonanorman.android.webviewup:core:0.1.0'
     implementation 'me.laoyuyu.aria:core:3.8.16'
 }
 

+ 3 - 1
gradle.properties

@@ -22,4 +22,6 @@ android.nonFinalResIds=false
 
 MAVEN_LIB_GROUP=io.github.jonanorman.android.webviewup
 MAVEN_LIB_GIT_URL=https://github.com/JonaNorman/WebViewUpgrade
-MAVEN_LIB_LICENSE=MIT
+MAVEN_LIB_LICENSE=MIT
+
+org.gradle.java.home=/Applications/Android Studio.app/contents/jbr/Contents/Home

+ 4 - 1
publish.gradle

@@ -154,7 +154,10 @@ afterEvaluate {
                     }
                     withXml {
                         def dependenciesNode = asNode().appendNode('dependencies')
-                        def scopes = [configurations.compile]
+                        def scopes = []
+                        if (configurations.hasProperty("compile")) {
+                            scopes.add(configurations.compile)
+                        }
                         if (configurations.hasProperty("api")) {
                             scopes.add(configurations.api)
                         }