|
1 | 1 | plugins { |
2 | 2 | java |
3 | | - `maven-publish` |
4 | 3 | signing |
5 | 4 | id("org.jreleaser") version "1.17.0" |
6 | 5 | } |
@@ -58,98 +57,6 @@ tasks.jar { |
58 | 57 | } |
59 | 58 | } |
60 | 59 |
|
61 | | -// https://docs.gradle.org/current/userguide/publishing_maven.html |
62 | | -publishing { |
63 | | - publications { |
64 | | - create<MavenPublication>("mavenJava") { |
65 | | - |
66 | | - // dependencies |
67 | | - from(components["java"]) |
68 | | - |
69 | | - versionMapping { |
70 | | - usage("java-api") { |
71 | | - fromResolutionOf("runtimeClasspath") |
72 | | - } |
73 | | - usage("java-runtime") { |
74 | | - fromResolutionResult() |
75 | | - } |
76 | | - } |
77 | | - |
78 | | - pom { |
79 | | - name.set("FactSet Trading event-driven client library for Java") |
80 | | - description.set("Event-driven api client for the FactSet Trading API") |
81 | | - url.set("https://github.com/factset/enterprise-sdk-eventdriven-factsettrading-java") |
82 | | - licenses { |
83 | | - license { |
84 | | - name.set("The Apache License, Version 2.0'") |
85 | | - url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") |
86 | | - } |
87 | | - } |
88 | | - |
89 | | - developers { |
90 | | - developer { |
91 | | - id.set("enterprisesdk") |
92 | | - organization.set("FactSet") |
93 | | - organizationUrl.set("https://developer.factset.com") |
94 | | - } |
95 | | - } |
96 | | - |
97 | | - scm { |
98 | | - connection.set("scm:git:git://github.com/factset/enterprise-sdk-eventdriven-factsettrading-java.git") |
99 | | - developerConnection.set("scm:git:ssh://factset/enterprise-sdk-eventdriven-factsettrading-java.git") |
100 | | - url.set("https://github.com/factset/enterprise-sdk-eventdriven-factsettrading-java/") |
101 | | - } |
102 | | - } |
103 | | - } |
104 | | - } |
105 | | - |
106 | | - repositories { |
107 | | - maven { |
108 | | - var releasesRepoUrlEnv = System.getenv("MAVEN_RELEASES_URL") |
109 | | - var snapshotsRepoUrlEnv = System.getenv("MAVEN_SNAPSHOTS_URL") |
110 | | - var usernameEnv = System.getenv("MAVEN_USERNAME") |
111 | | - var passwordEnv = System.getenv("MAVEN_PASSWORD") |
112 | | - |
113 | | - if (releasesRepoUrlEnv == null) { |
114 | | - releasesRepoUrlEnv = "" |
115 | | - project.logger.error("MAVEN_RELEASES_URL not set") |
116 | | - } |
117 | | - |
118 | | - if (snapshotsRepoUrlEnv == null) { |
119 | | - snapshotsRepoUrlEnv = "" |
120 | | - project.logger.error("MAVEN_SNAPSHOTS_URL not set") |
121 | | - } |
122 | | - |
123 | | - if (usernameEnv == null) { |
124 | | - usernameEnv = "" |
125 | | - project.logger.error("MAVEN_USERNAME not set") |
126 | | - } |
127 | | - |
128 | | - if (passwordEnv == null) { |
129 | | - passwordEnv = "" |
130 | | - project.logger.error("MAVEN_PASSWORD not set") |
131 | | - } |
132 | | - |
133 | | - val releasesRepoUrl = uri(releasesRepoUrlEnv) |
134 | | - val snapshotsRepoUrl = uri(snapshotsRepoUrlEnv) |
135 | | - url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl |
136 | | - |
137 | | - credentials { |
138 | | - username = usernameEnv |
139 | | - password = passwordEnv |
140 | | - } |
141 | | - |
142 | | - authentication { |
143 | | - create<BasicAuthentication>("basic") |
144 | | - } |
145 | | - } |
146 | | - } |
147 | | - |
148 | | - signing { |
149 | | - sign(publications["mavenJava"]) |
150 | | - } |
151 | | -} |
152 | | - |
153 | 60 | configure<org.jreleaser.gradle.plugin.JReleaserExtension> { |
154 | 61 | gitRootSearch = true |
155 | 62 | project { |
|
0 commit comments