-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
51 lines (41 loc) · 1.05 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import java.text.SimpleDateFormat
plugins {
id 'java-library'
id 'maven-publish'
}
group 'com.reportmill'
version new SimpleDateFormat("yyyy.MM").format(new Date())
sourceSets.main.java.srcDirs = ['src']
sourceSets.main.resources.srcDirs = ['src']
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
}
dependencies {
}
tasks.publish.doFirst() {
def user = System.getenv("GITHUB_USER")
def pw = System.getenv("GITHUB_TOKEN")
println "Publish start user:$user"
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/reportmill/SnapKit"
credentials {
username = System.getenv("GITHUB_USER")
password = System.getenv("GITHUB_TOKEN")
println "Publish user: username=$username"
}
}
}
publications {
gpr(MavenPublication) {
artifactId 'snapkit'
from(components.java)
}
}
}