-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
134 lines (120 loc) · 3.73 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
buildscript {
repositories {
jcenter()
}
}
plugins {
id "com.jfrog.bintray" version "1.7.3"
id "com.palantir.git-version" version "3.0.0"
id "signing"
}
apply plugin: 'java'
apply plugin: 'maven-publish'
File localPropertiesFile = project.rootProject.file('local.properties')
Properties localProperties = new Properties()
if (localPropertiesFile.canRead())
localProperties.load(localPropertiesFile.newDataInputStream())
version = gitVersion()
subprojects.each { subproject -> evaluationDependsOn( subproject.path ) }
jar.dependsOn subprojects.tasks['classes']
jar {
manifest {
attributes 'Implementation-Title': 'Archive Patcher',
'Implementation-Version': version,
'Implementation-Vendor': 'https://github.com/andrewhayden/archive-patcher'
}
baseName = project.name
subprojects.each { subproject ->
from subproject.sourceSets.main.output
}
from "LICENSE"
}
task sourcesJar(type: Jar, dependsOn: classes) {
manifest {
attributes 'Implementation-Title': 'Archive Patcher',
'Implementation-Version': version,
'Implementation-Vendor': 'https://github.com/andrewhayden/archive-patcher'
}
baseName = project.name
classifier = 'sources'
subprojects.each { subproject ->
from subproject.sourceSets.main.allSource
}
from "LICENSE"
}
task javadocJar (type: Jar, dependsOn: javadoc) {
manifest {
attributes 'Implementation-Title': 'Archive Patcher',
'Implementation-Version': version,
'Implementation-Vendor': 'https://github.com/andrewhayden/archive-patcher'
}
baseName = project.name
classifier = 'javadoc'
subprojects.each { subproject ->
from subproject.javadoc.destinationDir
}
from "LICENSE"
}
allprojects {
repositories {
jcenter()
}
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
signing {
useInMemoryPgpKeys(
System.getenv("MAVEN_CENTRAL_KEY_ID"),
System.getenv("MAVEN_CENTRAL_KEY"),
System.getenv("MAVEN_CENTRAL_KEY_PASSWORD")
)
sign(publishing.publications)
}
publishing {
repositories {
maven {
name = "MavenCentral"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("MAVEN_CENTRAL_USERNAME")
password = System.getenv("MAVEN_CENTRAL_PASSWORD")
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
groupId 'com.eidu'
artifactId 'archive-patcher'
version gitVersion()
artifact sourcesJar
artifact javadocJar
pom {
name = "archive-patcher"
description = "Google Archive Patcher (EIDU fork)"
url = "https://github.com/EIDU/archive-patcher"
licenses {
license {
name = "Apache 2.0 License"
url = "https://raw.githubusercontent.com/EIDU/archive-patcher/main/LICENSE"
}
}
developers {
developer {
id = "berlix"
name = "Felix Engelhardt"
url = "https://github.com/berlix/"
}
}
scm {
url = "https://github.com/EIDU/archive-patcher"
connection = "scm:git:git://github.com/EIDU/archive-patcher.git"
developerConnection = "scm:git:ssh://[email protected]/EIDU/archive-patcher.git"
}
}
}
}
}