-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
110 lines (94 loc) · 2.74 KB
/
Copy pathbuild.gradle
File metadata and controls
110 lines (94 loc) · 2.74 KB
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
plugins {
id 'java-gradle-plugin'
id 'maven-publish'
id 'java'
id 'com.gradle.plugin-publish' version "1.2.1"
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
version = project.hasProperty('artifact_version') ? project.property('artifact_version') : '1.0'
group = artifact_group
description = artifact_description
def main = "${group}.${artifact_id}.Main"
shadowJar {
archiveClassifier = ''
archiveFileName = "${artifact_name}-${version}-standalone.jar"
manifest {
attributes 'Main-Class': main
}
mergeServiceFiles()
minimize()
}
tasks.build {
dependsOn shadowJar
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
gradlePlugin {
website.set("https://github.com/intisy/$artifact_name")
vcsUrl.set("https://github.com/intisy/$artifact_name")
plugins {
create(artifact_name) {
id = "$group.$artifact_name"
implementationClass = main
displayName = display_name
description = this.description
tags = ["github", "dependency", "jar", "jitpack"]
}
}
}
repositories {
mavenCentral()
}
tasks.withType(Javadoc) {
failOnError false
title = "$display_name API Documentation"
classpath = sourceSets.main.runtimeClasspath
destinationDir = file("$buildDir/docs/javadoc")
options {
encoding = 'UTF-8'
author = true
version = true
links("https://docs.oracle.com/en/java/javase/11/docs/api/")
}
}
dependencies {
implementation gradleApi()
implementation "com.squareup.okhttp3:okhttp:4.12.0"
implementation "com.google.code.gson:gson:2.10.1"
api "org.eclipse.jgit:org.eclipse.jgit:5.13.3.202401111512-r"
api("org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:5.13.3.202401111512-r") {
exclude group: 'com.jcraft', module: 'jsch'
exclude group: 'com.jcraft', module: 'jzlib'
}
api 'com.jcraft:jzlib:1.1.3'
api 'com.github.mwiede:jsch:2.27.5'
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation "org.junit.jupiter:junit-jupiter"
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from tasks.javadoc
}
artifacts {
archives javadocJar
}
test {
useJUnitPlatform()
outputs.upToDateWhen { false }
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
stackTraceFilters "entryPoint"
}
}
task createClasspathManifest {
def outputDir = file("$buildDir/$name")
inputs.files sourceSets.main.runtimeClasspath
outputs.dir outputDir
doLast {
outputDir.mkdirs()
file("$outputDir/plugin-classpath.txt").text = sourceSets.main.runtimeClasspath.join("\n")
}
}