Ver Fonte

修改账户中心后台项目发布设置

huxz há 7 anos atrás
pai
commit
0e5ee1bf81

+ 1 - 0
sso-manage-console/build.gradle

@@ -16,6 +16,7 @@ plugins {
 }
 
 apply plugin: 'com.uas.docker.spring.boot'
+apply from: "$projectDir/gradle/publish.gradle"
 
 dependencies {
   // Custom Libraries

+ 42 - 0
sso-manage-console/gradle/publish.gradle

@@ -0,0 +1,42 @@
+ext {
+    artifactoryBaseUrl = 'http://113.105.74.141:8081/artifactory'
+    artifactorySnapshotRepoUrl = "$artifactoryBaseUrl/libs-snapshot-local"
+    artifactoryReleaseRepoUrl = "$artifactoryBaseUrl/libs-release-local"
+}
+
+apply plugin: 'maven-publish'
+
+tasks.withType(JavaCompile) {
+    options.encoding = 'UTF-8'
+}
+
+task sourcesJar(type: Jar) {
+    baseName "${project.name}"
+    classifier 'sources'
+    from sourceSets.main.allSource
+}
+
+publishing {
+    publications {
+        manage(MavenPublication) {
+            groupId "${project.group}"
+            artifactId "${project.name}"
+            version "${project.version}"
+
+            artifact jar
+            artifact sourcesJar
+        }
+    }
+
+    repositories {
+        maven {
+            name 'remoteArtifactory'
+            url project.version.endsWith('-SNAPSHOT') ? artifactorySnapshotRepoUrl : artifactoryReleaseRepoUrl
+
+            credentials {
+                username = 'yingp'
+                password = '111111'
+            }
+        }
+    }
+}