@@ -10,14 +10,14 @@ buildscript {
10
10
classpath " com.diffplug.spotless:spotless-plugin-gradle:3.18.0"
11
11
classpath " de.thetaphi:forbiddenapis:2.6"
12
12
classpath " de.aaschmid:gradle-cpd-plugin:2.0"
13
+ classpath " jp.classmethod.aws:gradle-aws-plugin:0.41"
13
14
}
14
15
}
15
16
16
17
plugins {
17
18
id ' java-library'
18
19
id ' org.springframework.boot' version ' 2.1.5.RELEASE'
19
20
id ' maven-publish'
20
- id " com.jfrog.bintray" version " 1.8.4"
21
21
}
22
22
23
23
// basic plugins
@@ -45,7 +45,6 @@ apply from: "${rootProject.projectDir}/gradle/quality/spotless.gradle"
45
45
apply from : " ${ rootProject.projectDir} /gradle/version.gradle"
46
46
apply from : " ${ rootProject.projectDir} /gradle/resolveDependencies.gradle"
47
47
apply from : " ${ rootProject.projectDir} /gradle/sourceArtifact.gradle"
48
- apply from : " ${ rootProject.projectDir} /gradle/bintray.gradle"
49
48
50
49
group = " jp.xet.springframework.data.mirage"
51
50
ext. artifactId = " spring-data-mirage"
@@ -68,7 +67,8 @@ javadoc {
68
67
repositories {
69
68
jcenter()
70
69
mavenCentral()
71
- maven { url ' http://dl.bintray.com/dai0304/spar-wings' }
70
+ maven { url " http://maven.classmethod.info/snapshot" } // for spar-wings
71
+ maven { url " http://maven.classmethod.info/release" } // for spar-wings
72
72
}
73
73
74
74
configurations {
@@ -112,3 +112,52 @@ wrapper {
112
112
gradleVersion = ' 5.2.1'
113
113
distributionType = Wrapper.DistributionType . ALL
114
114
}
115
+
116
+ // ======== deploy ========
117
+ apply plugin : " jp.classmethod.aws"
118
+ aws {
119
+ profileName = null
120
+ }
121
+ publishing {
122
+ repositories {
123
+ maven {
124
+ def releasesRepoUrl = " ${ System.getenv("PUBLISH_REPOSITORY")} /release"
125
+ def snapshotsRepoUrl = " ${ System.getenv("PUBLISH_REPOSITORY")} /snapshot"
126
+ url version. endsWith(" SNAPSHOT" ) ? snapshotsRepoUrl : releasesRepoUrl
127
+
128
+ credentials(AwsCredentials ) {
129
+ def profileName = project. hasProperty(" awsProfileForMetropolisRepo" ) ? project. awsProfileForMetropolisRepo : null
130
+ def cred = aws. newCredentialsProvider(profileName). credentials
131
+ accessKey cred. getAWSAccessKeyId()
132
+ secretKey cred. getAWSSecretKey()
133
+ }
134
+ }
135
+ }
136
+
137
+ publications {
138
+ mavenJava(MavenPublication ) {
139
+ from components. java
140
+ artifact sourcesJar {
141
+ classifier " sources"
142
+ }
143
+ artifact javadocJar {
144
+ classifier " javadoc"
145
+ }
146
+ pom. withXml {
147
+ asNode(). children(). last() + {
148
+ resolveStrategy = Closure . DELEGATE_FIRST
149
+ name project. name
150
+ description project. description
151
+ inceptionYear " 2015"
152
+ licenses {
153
+ license {
154
+ name " The Apache Software License, Version 2.0"
155
+ url " http://www.apache.org/license/LICENSE-2.0.txt"
156
+ distribution " repo"
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
0 commit comments