-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
109 lines (96 loc) · 2.81 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
plugins {
id "net.ltgt.errorprone" version "3.1.0"
id 'application'
id 'checkstyle'
id 'jacoco'
id 'java'
id 'maven-publish'
id 'signing'
}
checkstyle {
toolVersion "8.11"
}
group 'gent.davidsar.stubjars'
version '0.3.4-SNAPSHOT'
sourceCompatibility = 1.11
mainClassName = "davidsar.gent.stubjars.Main"
repositories {
mavenCentral()
}
java {
withSourcesJar()
withJavadocJar()
}
jar {
manifest {
attributes("Main-Class": mainClassName)
}
from {
configurations.runtimeClasspath.collect { zipTree(it) }
}
duplicatesStrategy DuplicatesStrategy.EXCLUDE
}
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
dependencies {
errorprone 'com.google.errorprone:error_prone_core:2.18.0'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation 'org.assertj:assertj-core:3.25.1'
implementation 'ch.qos.logback:logback-classic:1.4.6'
implementation 'org.jetbrains:annotations:24.0.1'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'stubjars'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'StubJars'
description = 'Transforms compiled Java JAR and AAR into source code stubs for linking'
url = 'https://github.com/dmssargent/StubJars'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'dmssargent'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/dmssargent/StubJars.git'
developerConnection = 'scm:git:git://github.com/dmssargent/StubJars.git'
url = 'https://github.com/dmssargent/StubJars'
}
}
}
}
repositories {
maven {
name = 'local'
url = layout.buildDirectory.dir("repo")
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
}
tasks.register('zipMavenRepo', Zip) {
dependsOn ':publishMavenJavaPublicationToLocalRepository'
from fileTree(layout.buildDirectory.dir("repo"))
archiveFileName = "repo-${project.version}.zip"
}