Skip to content

Commit 2fd4f26

Browse files
committed
Upload to maved
-gradle job to upload aar to maven server
1 parent 1f05ca7 commit 2fd4f26

5 files changed

Lines changed: 164 additions & 154 deletions

File tree

client/build.gradle.kts

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
plugins {
22
java
33
id("com.github.sherter.google-java-format") version "0.9"
4-
id("maven-publish")
54
}
65

76
java {
@@ -26,36 +25,13 @@ dependencies {
2625
}
2726

2827
/* ----------- Publishing config ------------------- */
29-
// supressed for local development
30-
// if you need to publish from local machine, create `gradle.properties` file in a project root and add 3 vairables:
31-
// - version
32-
// - regulaforensicsMavenUser
33-
// - regulaforensicsMavenPassword
34-
if (project.hasProperty("regulaforensicsMavenUser")) {
28+
if (project.hasProperty("upload")) {
29+
val fullVersion: String = project.property("version") as String
30+
val uploadArtifactsToMavenPath = project.property("uploadArtifactsToMavenPath") as String
3531

36-
val regulaforensicsMavenPassword: String by project
37-
val regulaforensicsMavenUser: String by project
32+
project.extra["groupId"] = "documentreader"
33+
project.extra["artifactId"] = "webclient"
34+
project.extra["fullVersion"] = fullVersion
3835

39-
publishing {
40-
publications {
41-
create<MavenPublication>("client") {
42-
artifactId = "webclient"
43-
from(components["java"])
44-
}
45-
}
46-
repositories {
47-
maven {
48-
49-
val releasesRepoUrl = uri("sftp://maven.regulaforensics.com:22/RegulaDocumentReaderWebClient")
50-
val betaRepoUrl = uri("sftp://maven.regulaforensics.com:22/RegulaDocumentReaderWebClient/Beta")
51-
52-
name = "regulaforensics"
53-
url = if (version.toString().contains("beta")) betaRepoUrl else releasesRepoUrl
54-
credentials {
55-
username = regulaforensicsMavenUser
56-
password = regulaforensicsMavenPassword
57-
}
58-
}
59-
}
60-
}
36+
apply(from = uploadArtifactsToMavenPath)
6137
}

gradle/wrapper/gradle-wrapper.jar

626 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 153 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)