Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ORLib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ dependencies {

implementation 'com.github.iammohdzaki:Password-Generator:0.6'

api project(':protobuf')
api project(':orlib-protobuf')
}


Expand Down
70 changes: 70 additions & 0 deletions protobuf/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}

java {
Expand Down Expand Up @@ -42,3 +44,71 @@ sourceSets {
tasks.withType(ProcessResources) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

task sourcesJar(type: Jar) {
dependsOn tasks.named('generateProto')
from sourceSets.main.java.srcDirs
archiveClassifier = 'sources'
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.java

artifact sourcesJar

group = "io.openremote"
artifactId = "orlib-protobuf"

pom {
name = 'OpenRemote Android Library Protobuf classes'
description = 'Provides the Protobuf classes used by the Android OpenRemote Library'
url = 'https://github.com/openremote/console-android'
licenses {
license {
name = 'GNU Affero General Public License v3.0'
url = 'https://www.gnu.org/licenses/agpl-3.0.en.html'
}
}
developers {
developer {
id = 'developers'
name = 'Developers'
email = 'developers@openremote.io'
organization = 'OpenRemote'
organizationUrl = 'https://openremote.io'
}
}
scm {
connection = 'scm:git:git://github.com/openremote/console-android.git'
developerConnection = 'scm:git:ssh://github.com:openremote/console-android.git'
url = 'https://github.com/openremote/console-android/tree/main'
}
}
}
}

repositories {
maven {
if (!version.endsWith('-LOCAL')) {
credentials {
username = findProperty("publishUsername")
password = findProperty("publishPassword")
}
}
url = version.endsWith('-LOCAL') ? layout.buildDirectory.dir('repo') : version.endsWith('-SNAPSHOT') ? findProperty("snapshotsRepoUrl") : findProperty("releasesRepoUrl")
}
}
}

signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
if (signingKey && signingPassword) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}
}
}
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ fileTree(dir: rootDir, include: "**/build.gradle")
.each {
include it.parent.replace(rootDir.canonicalPath, "").replace("\\", ":").replace("/", ":")
}

project(':protobuf').name = 'orlib-protobuf'
Loading