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
6 changes: 5 additions & 1 deletion .github/workflows/gradle_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-java@v4
with:
java-version: '17'
Expand Down
60 changes: 20 additions & 40 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ plugins {
id "biz.aQute.bnd" version "6.1.0" apply false
}

if (System.getenv("GITHUB_ACTOR") == null) {
throw new Exception("Environment variable GITHUB_ACTOR not set. Please set to your github username.")
}

if (System.getenv("GITHUB_TOKEN") == null) {
throw new Exception("Environment variable GITHUB_TOKEN not set. Please generate and set to your personal access token: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens")
}

allprojects {
group = 'org.sensorhub'
}
Expand All @@ -33,18 +25,14 @@ subprojects {
repositories {
//mavenLocal()
mavenCentral()
maven {
url "https://raw.github.com/eurotech/kura_addons/mvn-repo"
}
maven {
url "https://artifacts.unidata.ucar.edu/repository/unidata-all/"
}
maven {
name = 'osh-core'
url = uri("https://maven.pkg.github.com/opensensorhub/osh-core")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
if(System.getenv("GITHUB_ACTOR") && System.getenv("GITHUB_TOKEN")) {
maven {
name = 'osh-core'
url = uri("https://maven.pkg.github.com/opensensorhub/osh-core")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
Expand Down Expand Up @@ -331,28 +319,20 @@ subprojects {
}
}
}

// publish to repo
task publishBundle(type: Exec) {
def bundleFile = osgi.outputs.files.singleFile
//commandLine 'curl', '-s', '-X', 'POST', '-H', """artifactUrl: file://${bundleFile}""", 'http://localhost:8181/cave/repository/api/repositories/osh-addons/artifact'
commandLine 'kubectl', 'cp', "${bundleFile}", 'osh-addons-69497bf779-4q65x:/opt/osh-node/data/addons'
}
}

/*// publish to maven repo
publishing {
repositories {
maven {
name = 'GitHubPackages'
url = 'https://maven.pkg.github.com/opensensorhub/osh-addons'
credentials {
username = ''
password = ''
}
p.tasks.named("publishMavenJavaPublicationToGitHubPackagesRepository") {
onlyIf {
//
MavenArtifactRepository repo = repository as MavenArtifactRepository;
MavenPublication pub = publication as MavenPublication;

HttpURLConnection connection = new URL("$repo.url/${pub.groupId.replace('.', '/')}/$pub.artifactId/$pub.version/$pub.artifactId-${pub.version}.jar").openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic ${new String(Base64.getEncoder().encode("$repo.credentials.username:$repo.credentials.password".bytes))}");
connection.connect();
return connection.responseCode == 404;
}
}
}*/
}
}

// create one configuration for each distribution
Expand Down
6 changes: 4 additions & 2 deletions comm/sensorhub-comm-ble-dbus/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ description = 'Bluetooth LE Comm Network (D-Bus)'
ext.details = 'Bluetooth Smart (Low Energy) network adapter based on D-Bus (Linux only)'

def thisProjectDir = projectDir
repositories {
maven { url "file:///$thisProjectDir/libs" }
rootProject.allprojects {
repositories {
maven { url "file:///$thisProjectDir/libs" }
}
}

dependencies {
Expand Down
6 changes: 6 additions & 0 deletions comm/sensorhub-comm-dio/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
description = 'Device I/O Comm Providers'
ext.details = 'Direct device communication using JDK Device I/O library (UART, I2C, SPI, GPIO)'

rootProject.allprojects {
repositories {
maven { url "https://raw.github.com/eurotech/kura_addons/mvn-repo" }
}
}

dependencies {
implementation 'org.sensorhub:sensorhub-core:' + oshCoreVersion
embeddedImpl 'jdk:jdk.dio:1.0.1'
Expand Down
7 changes: 7 additions & 0 deletions comm/sensorhub-comm-jssc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
description = 'JSSC Serial Comm Provider'
ext.details = 'Serial communication provider based on Java Simple Serial Connector library'

def thisProjectDir = projectDir
rootProject.allprojects {
repositories {
mavenCentral()
}
}

dependencies {
implementation 'org.sensorhub:sensorhub-core:' + oshCoreVersion
implementation("io.github.java-native:jssc:2.10.2")
Expand Down
6 changes: 4 additions & 2 deletions comm/sensorhub-comm-rxtx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ description = 'RXTX Serial Comm Provider'
ext.details = 'Serial communication provider based on RXTX library'

def thisProjectDir = projectDir
repositories {
maven { url "file:///$thisProjectDir/libs" }
rootProject.allprojects {
repositories {
maven { url "file:///$thisProjectDir/libs" }
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ dependencies {
testImplementation('junit:junit:4.13.1')
}

def thisProjectDir = projectDir
rootProject.allprojects {
repositories {
mavenCentral()
}
}

// exclude tests requiring connection to the sensor
// these have to be run manually
// If tests are to be excluded list them here as follows
Expand Down
6 changes: 6 additions & 0 deletions sensors/robotics/sensorhub-driver-pwm-servos/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ description = 'PCA9685 PWM Servos Driver'
ext.details = 'Driver for Adafruit PCA9685 16-channels PWM servo board'
version = '0.1-SNAPSHOT'

rootProject.allprojects {
repositories {
maven { url "https://raw.github.com/eurotech/kura_addons/mvn-repo" }
}
}

dependencies {
implementation 'org.sensorhub:sensorhub-core:' + oshCoreVersion
implementation project(':sensorhub-comm-dio')
Expand Down
7 changes: 5 additions & 2 deletions sensors/video/sensorhub-driver-kinect/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ dependencies {
}

def thisProjectDir = projectDir
repositories {
maven { url "file:///$thisProjectDir/libs" }
rootProject.allprojects {
repositories {
mavenCentral()
maven { url "file:///$thisProjectDir/libs" }
}
}

// add info to OSGi manifest
Expand Down
6 changes: 4 additions & 2 deletions sensors/video/sensorhub-driver-v4l/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ ext.details = 'Driver for Video4Linux compatible cameras (only supported on Linu
version = '1.1.0'

def thisProjectDir = projectDir
repositories {
maven { url "file:///$thisProjectDir/libs" }
rootProject.allprojects {
repositories {
maven { url "file:///$thisProjectDir/libs" }
}
}

dependencies {
Expand Down
6 changes: 6 additions & 0 deletions sensors/weather/sensorhub-driver-nexrad/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ description = 'Nexrad Doppler Radar Network'
ext.details = 'Driver for Nexrad Doppler radars, supporting both Level II and Level III products'
version = '1.0.0-SNAPSHOT'

rootProject.allprojects {
repositories {
maven { url 'https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases' }
}
}

dependencies {
implementation 'org.sensorhub:sensorhub-core:' + oshCoreVersion
embeddedImpl 'org.apache.httpcomponents:httpclient:4.5.13'
Expand Down
14 changes: 14 additions & 0 deletions sensors/weather/sensorhub-utils-grid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ description = 'Gridded Dataset Utilities'
ext.details = 'Various utilities for handling grid formats based on Unidata library'
version = '0.3.3'

def thisProjectDir = projectDir
rootProject.allprojects {
repositories {
/*maven {
name 'unidata'
url 'https://artifacts.unidata.ucar.edu/repository/unidata-all'
}*/
maven {
name 'unidata-local'
url "file:///$thisProjectDir/libs"
}
}
}

dependencies {
implementation 'org.sensorhub:sensorhub-core:' + oshCoreVersion
embeddedApi ('edu.ucar:grib:4.6.10') {
Expand Down
6 changes: 4 additions & 2 deletions services/sensorhub-service-sensorthings/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ version = '0.1.0'


def thisProjectDir = projectDir
repositories {
maven { url "file:///$thisProjectDir/libs" }
rootProject.allprojects {
repositories {
maven { url "file:///$thisProjectDir/libs" }
}
}

dependencies {
Expand Down
Loading