Browse Source

暂时去掉了Maven Central的支持

kongzue 4 years ago
parent
commit
042a29a78a

+ 6 - 1
.idea/compiler.xml

@@ -1,7 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="CompilerConfiguration">
-    <bytecodeTargetLevel target="1.8">
+    <bytecodeTargetLevel target="1.7">
+      <module name="DialogXDemo.app" target="1.8" />
+      <module name="DialogXDemo.DialogX" target="1.8" />
+      <module name="DialogXDemo.DialogXIOSStyle" target="1.8" />
+      <module name="DialogXDemo.DialogXKongzueStyle" target="1.8" />
+      <module name="DialogXDemo.DialogXMIUIStyle" target="1.8" />
       <module name="DialogXInterface" target="1.7" />
     </bytecodeTargetLevel>
   </component>

+ 0 - 1
.idea/gradle.xml

@@ -16,7 +16,6 @@
             <option value="$PROJECT_DIR$/DialogXInterface" />
             <option value="$PROJECT_DIR$/DialogXKongzueStyle" />
             <option value="$PROJECT_DIR$/DialogXMIUIStyle" />
-            <option value="$PROJECT_DIR$/DialogXStyleInterface" />
             <option value="$PROJECT_DIR$/app" />
           </set>
         </option>

+ 1 - 1
.idea/misc.xml

@@ -129,7 +129,7 @@
       </value>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8 (2)" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="1.8 (2)" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/build/classes" />
   </component>
   <component name="ProjectType">

+ 55 - 7
DialogX/build.gradle

@@ -1,11 +1,12 @@
 apply plugin: 'com.android.library'
+apply plugin: 'com.github.dcendents.android-maven'
+apply plugin: 'com.jfrog.bintray'
 
-ext {
-    PUBLISH_GROUP_ID = "com.kongzue.dialogx"
-    PUBLISH_ARTIFACT_ID = 'dialogx'
-    PUBLISH_VERSION = BUILD_VERSION
-}
-apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"
+def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
+def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
+
+group = "com.kongzue.dialogx"
+version = BUILD_VERSION
 
 android {
     compileSdkVersion 30
@@ -29,6 +30,37 @@ android {
         }
     }
 }
+
+install {
+    repositories.mavenInstaller {
+        // This generates POM.xml with proper parameters
+        pom {
+            project {
+                packaging 'aar'
+                name 'dialogx'
+                url siteUrl
+                licenses {
+                    license {
+                        name 'The Apache Software License, Version 2.0'
+                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+                    }
+                }
+                developers {
+                    developer {
+                        id 'myzchh'//设置自己ID
+                        name 'myzchh'//设置自己名字
+                        email 'myzcxhh@live.cn'//设置自己邮箱
+                    }
+                }
+                scm {
+                    connection gitUrl
+                    developerConnection gitUrl
+                    url siteUrl
+                }
+            }
+        }
+    }
+}
 task sourcesJar(type: Jar) {
     from android.sourceSets.main.java.srcDirs
     classifier = 'sources'
@@ -38,7 +70,23 @@ artifacts {
     archives sourcesJar
 }
 
+Properties properties = new Properties()
+properties.load(project.rootProject.file('local.properties').newDataInputStream())
+bintray {
+    user = properties.getProperty("bintray.user")
+    key = properties.getProperty("bintray.apikey")
+    configurations = ['archives']
+    pkg {
+        repo = "maven"
+        name = "dialogX" //项目在JCenter的名字
+        websiteUrl = siteUrl
+        vcsUrl = gitUrl
+        licenses = ["Apache-2.0"]
+        publish = true
+    }
+}
 dependencies {
     implementation fileTree(dir: "libs", include: ["*.jar"])
-    implementation 'androidx.appcompat:appcompat:1.2.0'
+    implementation 'androidx.appcompat:appcompat:1.2.0+'
+    api files('libs\\DialogXInterface.jar')
 }

BIN
DialogX/libs/DialogXInterface.jar


+ 64 - 6
DialogXIOSStyle/build.gradle

@@ -1,11 +1,13 @@
 apply plugin: 'com.android.library'
+apply plugin: 'com.github.dcendents.android-maven'
+apply plugin: 'com.jfrog.bintray'
+
+def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
+def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
+
+group = "com.kongzue.dialogx.style.ios"
+version = BUILD_VERSION
 
-ext {
-    PUBLISH_GROUP_ID = "com.kongzue.dialogx"
-    PUBLISH_ARTIFACT_ID = 'DialogXIOSStyle'
-    PUBLISH_VERSION = BUILD_VERSION
-}
-apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"
 android {
     compileSdkVersion 30
 
@@ -24,6 +26,62 @@ android {
     }
 }
 
+install {
+    repositories.mavenInstaller {
+        // This generates POM.xml with proper parameters
+        pom {
+            project {
+                packaging 'aar'
+                name 'dialogXiOSStyle'
+                url siteUrl
+                licenses {
+                    license {
+                        name 'The Apache Software License, Version 2.0'
+                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+                    }
+                }
+                developers {
+                    developer {
+                        id 'myzchh'//设置自己ID
+                        name 'myzchh'//设置自己名字
+                        email 'myzcxhh@live.cn'//设置自己邮箱
+                    }
+                }
+                scm {
+                    connection gitUrl
+                    developerConnection gitUrl
+                    url siteUrl
+                }
+            }
+        }
+    }
+}
+task sourcesJar(type: Jar) {
+    from android.sourceSets.main.java.srcDirs
+    classifier = 'sources'
+}
+
+artifacts {
+    archives sourcesJar
+}
+
+Properties properties = new Properties()
+properties.load(project.rootProject.file('local.properties').newDataInputStream())
+bintray {
+    user = properties.getProperty("bintray.user")
+    key = properties.getProperty("bintray.apikey")
+    configurations = ['archives']
+    pkg {
+        repo = "maven"
+        name = "dialogXiOSStyle" //项目在JCenter的名字
+        websiteUrl = siteUrl
+        vcsUrl = gitUrl
+        licenses = ["Apache-2.0"]
+        publish = true
+    }
+}
 dependencies {
     implementation fileTree(dir: "libs", include: ["*.jar"])
+    implementation project(path: ':DialogX')
+    implementation project(path: ':DialogXInterface')
 }

+ 0 - 0
DialogXStyleInterface/.gitignore → DialogXInterface/.gitignore


+ 9 - 0
DialogXInterface/build.gradle

@@ -0,0 +1,9 @@
+apply plugin: 'java-library'
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation files('libs\\android.jar')
+}
+
+sourceCompatibility = "1.7"
+targetCompatibility = "1.7"

BIN
DialogXInterface/libs/android.jar


+ 0 - 0
DialogXStyleInterface/src/main/java/com/kongzue/dialogx/interfaces/DialogXStyle.java → DialogXInterface/src/main/java/com/kongzue/dialogx/interfaces/DialogXStyle.java


+ 35 - 0
DialogXInterface/src/main/java/com/kongzue/dialogx/interfaces/ProgressViewInterface.java

@@ -0,0 +1,35 @@
+package com.kongzue.dialogx.interfaces;
+
+/**
+ * @author: Kongzue
+ * @github: https://github.com/kongzue/
+ * @homepage: http://kongzue.com/
+ * @mail: myzcxhh@live.cn
+ * @createTime: 2020/11/3 20:39
+ */
+public interface ProgressViewInterface {
+    
+    //停止加载动画
+    void noLoading();
+    
+    //切换至完成状态
+    void success();
+    
+    //切换至警告状态
+    void warning();
+    
+    //切换至错误状态
+    void error();
+    
+    //切换至进度(取值 0f-1f)
+    void progress(float progress);
+    
+    //切换至加载状态
+    void loading();
+    
+    //不同状态切换时,衔接动画完成后执行
+    ProgressViewInterface whenShowTick(Runnable runnable);
+    
+    //设置颜色
+    ProgressViewInterface setColor(int color);
+}

+ 65 - 6
DialogXKongzueStyle/build.gradle

@@ -1,10 +1,13 @@
 apply plugin: 'com.android.library'
-ext {
-    PUBLISH_GROUP_ID = "com.kongzue.dialogx"
-    PUBLISH_ARTIFACT_ID = 'DialogXKongzueStyle'
-    PUBLISH_VERSION = BUILD_VERSION
-}
-apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"
+apply plugin: 'com.github.dcendents.android-maven'
+apply plugin: 'com.jfrog.bintray'
+
+def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
+def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
+
+group = "com.kongzue.dialogx.style.kongzue"
+version = BUILD_VERSION
+
 android {
     compileSdkVersion 30
 
@@ -23,6 +26,62 @@ android {
     }
 }
 
+install {
+    repositories.mavenInstaller {
+        // This generates POM.xml with proper parameters
+        pom {
+            project {
+                packaging 'aar'
+                name 'dialogXKongzueStyle'
+                url siteUrl
+                licenses {
+                    license {
+                        name 'The Apache Software License, Version 2.0'
+                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+                    }
+                }
+                developers {
+                    developer {
+                        id 'myzchh'//设置自己ID
+                        name 'myzchh'//设置自己名字
+                        email 'myzcxhh@live.cn'//设置自己邮箱
+                    }
+                }
+                scm {
+                    connection gitUrl
+                    developerConnection gitUrl
+                    url siteUrl
+                }
+            }
+        }
+    }
+}
+task sourcesJar(type: Jar) {
+    from android.sourceSets.main.java.srcDirs
+    classifier = 'sources'
+}
+
+artifacts {
+    archives sourcesJar
+}
+
+Properties properties = new Properties()
+properties.load(project.rootProject.file('local.properties').newDataInputStream())
+bintray {
+    user = properties.getProperty("bintray.user")
+    key = properties.getProperty("bintray.apikey")
+    configurations = ['archives']
+    pkg {
+        repo = "maven"
+        name = "dialogXKongzueStyle" //项目在JCenter的名字
+        websiteUrl = siteUrl
+        vcsUrl = gitUrl
+        licenses = ["Apache-2.0"]
+        publish = true
+    }
+}
 dependencies {
     implementation fileTree(dir: "libs", include: ["*.jar"])
+    implementation project(path: ':DialogX')
+    implementation project(path: ':DialogXInterface')
 }

+ 65 - 6
DialogXMIUIStyle/build.gradle

@@ -1,10 +1,13 @@
 apply plugin: 'com.android.library'
-ext {
-    PUBLISH_GROUP_ID = "com.kongzue.dialogx"
-    PUBLISH_ARTIFACT_ID = 'DialogXMIUIStyle'
-    PUBLISH_VERSION = BUILD_VERSION
-}
-apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"
+apply plugin: 'com.github.dcendents.android-maven'
+apply plugin: 'com.jfrog.bintray'
+
+def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
+def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
+
+group = "com.kongzue.dialogx.style.miui"
+version = BUILD_VERSION
+
 android {
     compileSdkVersion 30
 
@@ -24,6 +27,62 @@ android {
     }
 }
 
+install {
+    repositories.mavenInstaller {
+        // This generates POM.xml with proper parameters
+        pom {
+            project {
+                packaging 'aar'
+                name 'dialogXMIUIStyle'
+                url siteUrl
+                licenses {
+                    license {
+                        name 'The Apache Software License, Version 2.0'
+                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+                    }
+                }
+                developers {
+                    developer {
+                        id 'myzchh'//设置自己ID
+                        name 'myzchh'//设置自己名字
+                        email 'myzcxhh@live.cn'//设置自己邮箱
+                    }
+                }
+                scm {
+                    connection gitUrl
+                    developerConnection gitUrl
+                    url siteUrl
+                }
+            }
+        }
+    }
+}
+task sourcesJar(type: Jar) {
+    from android.sourceSets.main.java.srcDirs
+    classifier = 'sources'
+}
+
+artifacts {
+    archives sourcesJar
+}
+
+Properties properties = new Properties()
+properties.load(project.rootProject.file('local.properties').newDataInputStream())
+bintray {
+    user = properties.getProperty("bintray.user")
+    key = properties.getProperty("bintray.apikey")
+    configurations = ['archives']
+    pkg {
+        repo = "maven"
+        name = "dialogXMIUIStyle" //项目在JCenter的名字
+        websiteUrl = siteUrl
+        vcsUrl = gitUrl
+        licenses = ["Apache-2.0"]
+        publish = true
+    }
+}
 dependencies {
     implementation fileTree(dir: "libs", include: ["*.jar"])
+    implementation project(path: ':DialogX')
+    implementation project(path: ':DialogXInterface')
 }

+ 0 - 36
DialogXStyleInterface/build.gradle

@@ -1,36 +0,0 @@
-apply plugin: 'com.android.library'
-
-ext {
-    PUBLISH_GROUP_ID = "com.kongzue.dialogx"
-    PUBLISH_ARTIFACT_ID = 'DialogXStyleInterface'
-    PUBLISH_VERSION = "1.0.0"
-}
-apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"
-
-android {
-    compileSdkVersion 30
-    buildToolsVersion "30.0.3"
-
-    defaultConfig {
-        minSdkVersion 21
-        targetSdkVersion 30
-        versionCode 1
-        versionName "1.0.0"
-        consumerProguardFiles "consumer-rules.pro"
-    }
-
-    buildTypes {
-        release {
-            minifyEnabled false
-            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
-        }
-    }
-    compileOptions {
-        sourceCompatibility JavaVersion.VERSION_1_8
-        targetCompatibility JavaVersion.VERSION_1_8
-    }
-}
-
-dependencies {
-    implementation 'androidx.appcompat:appcompat:1.2.0'
-}

+ 0 - 0
DialogXStyleInterface/consumer-rules.pro


+ 0 - 21
DialogXStyleInterface/proguard-rules.pro

@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile

+ 0 - 5
DialogXStyleInterface/src/main/AndroidManifest.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.kongzue.dialogx.interfaces">
-
-</manifest>

+ 0 - 35
DialogXStyleInterface/src/main/java/com/kongzue/dialogx/interfaces/ProgressViewInterface.java

@@ -1,35 +0,0 @@
-package com.kongzue.dialogx.interfaces;
-
-/**
- * author: Kongzue
- * github: https://github.com/kongzue/
- * homepage: http://kongzue.com/
- * mail: myzcxhh@live.cn
- * createTime: 2020/11/3 20:39
- */
-public interface ProgressViewInterface {
-    
-    //停止加载动画
-    void noLoading();
-    
-    //切换至完成状态
-    void success();
-    
-    //切换至警告状态
-    void warning();
-    
-    //切换至错误状态
-    void error();
-    
-    //切换至进度(取值 0f-1f)
-    void progress(float progress);
-    
-    //切换至加载状态
-    void loading();
-    
-    //不同状态切换时,衔接动画完成后执行
-    ProgressViewInterface whenShowTick(Runnable runnable);
-    
-    //设置颜色
-    ProgressViewInterface setColor(int color);
-}

+ 0 - 1
settings.gradle

@@ -1,4 +1,3 @@
-include ':DialogXStyleInterface'
 include ':DialogXInterface'
 include ':DialogXMIUIStyle'
 include ':DialogXKongzueStyle'