ソースを参照

上传本地maven

niusongtao@dl-cg.com 4 年 前
コミット
9eb4b2b731
1 ファイル変更26 行追加0 行削除
  1. 26 0
      base_library/build.gradle

+ 26 - 0
base_library/build.gradle

@@ -1,5 +1,6 @@
 apply plugin: 'com.android.library'
 apply plugin: 'com.jakewharton.butterknife'
+apply plugin: 'maven'
 
 def configs = rootProject.ext.configs
 def lib = rootProject.ext.deps
@@ -44,6 +45,31 @@ android {
 
 }
 
+
+ext{
+    //group
+    PUBLISH_GROUP_ID = "com.mgtech.base_library"
+    //包名
+    PUBLISH_ARTIFACT_ID = "base_library"
+    //版本号
+    PUBLISH_VERSION = "1.0.0"
+    //仓库地址
+    PUBLISH_URL = "file://D://repository/"
+}
+
+uploadArchives{
+    repositories {
+        mavenDeployer {
+            repository(url:PUBLISH_URL)
+            pom.project{
+                groupId project.PUBLISH_GROUP_ID
+                artifactId project.PUBLISH_ARTIFACT_ID
+                version project.PUBLISH_VERSION
+            }
+        }
+    }
+}
+
 dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])