Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglasdc3 committed Mar 20, 2023
0 parents commit 618d5fb
Show file tree
Hide file tree
Showing 16 changed files with 697 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/.dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
67 changes: 67 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build

on:
workflow_dispatch:
push:

jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
jpackage: 'jpackage-linux.cfg'
executable: 'dump1090-recorder.deb'
- os: windows-latest
jpackage: 'jpackage-windows.cfg'
executable: 'dump1090-recorder.exe'
- os: macos-latest
jpackage: 'jpackage-mac.cfg'
executable: 'dump1090-recorder.app'

name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- id: checkout-code
name: Checkout code
uses: actions/checkout@v3

- id: setup-jdk
name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'

- name: Setup gradle
uses: gradle/gradle-build-action@v2

- id: build
name: Build jar file
run: './gradlew build --scan'

- name: "Add build scan URL as PR comment"
uses: actions/github-script@v5
if: github.event_name == 'pull_request' && failure()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ ${{ github.workflow }} failed: ${{ steps.gradle.outputs.build-scan-url }}'
})
- name: Create executable
run: jpackage --verbose "@jpackage.cfg" "@${{ matrix.jpackage }}"

- id: upload-executable
name: Upload executable
uses: actions/upload-artifact@v3
with:
path: ./build/release/*
name: ${{ matrix.executable }}
retention-days: 7
72 changes: 72 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: T

on:
release:

jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
needs: [ build-linux-installer, build-windows-installer ]
steps:

# DOWNLOAD INSTALLERS
- id: download-linux-installer
name: Download Linux installer
uses: actions/download-artifact@v3
with:
name: linux-installer

- id: download-windows-installer
name: Download Windows installer
uses: actions/download-artifact@v3
with:
name: windows-installer

- id: rename-downloaded-files
name: Rename downloaded files
run: |
ls -alR
mv consoleapp_0.0.1-1_amd64.deb consoleapp-0.0.1.deb
ls -alR
# CREATE GITHUB RELEASE AND ADD ASSETS
- id: tag
name: Move example-release tag
shell: bash
if: false
run: |
# Move tag
git tag -d example-release
git push --delete origin example-release
git tag -a example-release -m "Example of a Release"
git push --follow-tags
- id: create-release
name: Create GitHub release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: example-release
release_name: example-release
draft: false
prerelease: false
- id: release-linux-installer
name: Release Linux installer
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: consoleapp-0.0.1.deb
asset_name: consoleapp-0.0.1.deb
asset_content_type: application/x-binary
- id: release-windows-installer
name: Release Windows installer
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: consoleapp-0.0.1.msi
asset_name: consoleapp-0.0.1.msi
asset_content_type: application/x-binary
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Dump1090 Recorder

A simple utility which records dump1090 raw messages to log file for later processing and analysis.
Works with the output of [dump1090](https://github.com/antirez/dump1090) 30002 port.

## Usage

Download the executable from the releases page.

Inside a terminal / Console window run the following command

```bash
<executable> -h <your-dump-1090-ip> -p 30002
```

For example on windows

```bash
dump1090-recorder.exe -h 127.0.0.1 -p 30002
```

On mac there is an issue with the build you can run the app using

```bash
./dump1090-recorder/Contents/MacOS/dump1090-recorder -h 127.0.0.1 -p 30002
```

## Contributing

You can contribute to this project by reporting/fixing bugs or implementing new features.
We are always looking for help on this project.
46 changes: 46 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
plugins {
id 'java'
id 'application'
}

group 'com.github.douglasdc3'
version '1.0.0-SNAPSHOT'
description = """Simple app which uses a running dump1090 instance to record dump1090 to rolling log file."""
mainClassName = 'com.github.douglasdc3.dump1090recorder.Main'

repositories {
mavenCentral()
}

dependencies {
implementation 'commons-cli:commons-cli:1.5.0'
implementation 'com.vlkan.rfos:rotating-fos:0.9.5'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}

test {
useJUnitPlatform()
}

jar {
archiveFileName = 'dump1090-recorder.jar'

manifest {
attributes["Main-Class"] = mainClassName
}
}

task fatJar(type: Jar) {
archiveFileName = 'dump1090-recorder.jar'

manifest {
attributes 'Main-Class': "${mainClassName}"
}
archiveBaseName = "${rootProject.name}"
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}

build.dependsOn(fatJar)
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 618d5fb

Please sign in to comment.