1- plugins {
2- id ' com.github.johnrengelman.shadow' version ' 2.0.4'
3- id ' java-library'
4- }
1+ apply plugin : ' java-library'
2+ apply plugin : ' maven'
3+ apply plugin : ' signing'
54
6- group = ' org.algorithm_visualizer '
5+ group = ' org.algorithm-visualizer '
76version = ' 2.3.1'
87sourceCompatibility = 1.8
98
@@ -15,4 +14,65 @@ dependencies {
1514 implementation ' com.google.code.gson:gson:2.8.5'
1615}
1716
18- shadowJar. archiveName = ' algorithm-visualizer.jar'
17+ task javadocJar (type : Jar ) {
18+ classifier = ' javadoc'
19+ from javadoc
20+ }
21+
22+ task sourcesJar (type : Jar ) {
23+ classifier = ' sources'
24+ from sourceSets. main. allSource
25+ }
26+
27+ artifacts {
28+ archives javadocJar, sourcesJar
29+ }
30+
31+ signing {
32+ sign configurations. archives
33+ }
34+
35+ uploadArchives {
36+ repositories {
37+ mavenDeployer {
38+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
39+
40+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
41+ authentication(userName : ossrhUsername, password : ossrhPassword)
42+ }
43+
44+ snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
45+ authentication(userName : ossrhUsername, password : ossrhPassword)
46+ }
47+
48+ pom. project {
49+ name ' tracers.java'
50+ packaging ' jar'
51+ // optionally artifactId can be defined here
52+ description ' Visualization Library for Java'
53+ url ' https://github.com/algorithm-visualizer/tracers.java'
54+
55+ scm {
56+ connection ' scm:git:git@github.com:algorithm-visualizer/tracers.java.git'
57+ developerConnection ' scm:git:git@github.com:algorithm-visualizer/tracers.java.git'
58+ url ' https://github.com/algorithm-visualizer/tracers.java'
59+ }
60+
61+ licenses {
62+ license {
63+ name ' The MIT License (MIT)'
64+ url ' http://opensource.org/licenses/MIT'
65+ }
66+ }
67+
68+ developers {
69+ developer {
70+ id ' parkjs814'
71+ name ' Jinseo Jason Park'
72+ email ' jason.park@gatech.edu'
73+ }
74+ }
75+ }
76+ }
77+ }
78+ }
0 commit comments