1+ plugins {
2+ id ' java'
3+ id ' maven-publish'
4+ id ' signing'
5+ }
6+
7+ sourceCompatibility = 1.8
8+ targetCompatibility = 1.8
9+ group ' com.javaquery'
10+ version ' 1.0.0'
11+
12+ repositories {
13+ mavenCentral()
14+ }
15+
16+ dependencies {
17+ // annotation bases libraries
18+ compileOnly " org.projectlombok:lombok:${ lombokVersion} "
19+ annotationProcessor " org.projectlombok:lombok:${ lombokVersion} "
20+
21+ implementation ' org.slf4j:slf4j-api:2.0.16'
22+ implementation ' com.javaquery:util:1.2.7'
23+
24+ // FTP client libraries
25+ implementation ' commons-net:commons-net:3.12.0'
26+ implementation ' com.github.mwiede:jsch:2.27.5'
27+
28+ implementation ' net.logstash.logback:logstash-logback-encoder:8.0'
29+
30+ testImplementation ' ch.qos.logback:logback-classic:1.5.16'
31+ testImplementation ' org.junit.jupiter:junit-jupiter:5.8.1'
32+ }
33+
34+ test {
35+ useJUnitPlatform()
36+ }
37+
38+ java {
39+ withJavadocJar()
40+ withSourcesJar()
41+ }
42+
43+ jar {
44+ manifest {
45+ attributes(
46+ ' Built-By' : " Vicky Thakor"
47+ )
48+ }
49+ }
50+
51+ publishing {
52+ publications {
53+ mavenJava(MavenPublication ) {
54+ artifactId = ' ftpclient'
55+ from components. java
56+
57+ versionMapping {
58+ usage(' java-api' ) {
59+ fromResolutionOf(' runtimeClasspath' )
60+ }
61+ usage(' java-runtime' ) {
62+ fromResolutionResult()
63+ }
64+ }
65+ pom {
66+ name = ' Java FTP Client'
67+ description = ' Java FTP client to extend interaction of http request'
68+ url = ' https://github.com/javaquery/ftpclient'
69+ licenses {
70+ license {
71+ name = ' MIT'
72+ url = ' https://github.com/javaquery/ftpclient/blob/main/LICENSE'
73+ }
74+ }
75+ developers {
76+ developer {
77+ id = ' javaquery'
78+ name = ' Vicky Thakor'
79+ 80+ timezone = ' +05:30'
81+ }
82+ }
83+ scm {
84+ connection = ' scm:git:git://github.com/javaquery/ftpclient.git'
85+ developerConnection = ' scm:git:ssh://github.com/javaquery/ftpclient.git'
86+ url = ' https://github.com/javaquery/ftpclient'
87+ }
88+ }
89+ }
90+ }
91+ repositories {
92+ maven {
93+ def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
94+ def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots"
95+ url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
96+ credentials {
97+ username " $mavenCentralUsername "
98+ password " $mavenCentralPassword "
99+ }
100+ }
101+ }
102+ }
103+
104+ signing {
105+ sign publishing. publications. mavenJava
106+ }
107+
108+ javadoc {
109+ if (JavaVersion . current(). isJava9Compatible()) {
110+ options. addBooleanOption(' html5' , true )
111+ }
112+ }
0 commit comments