Skip to content

Instantly share code, notes, and snippets.

View aalmiray's full-sized avatar
💭
🧰 building cool stuff

Andres Almiray aalmiray

💭
🧰 building cool stuff
View GitHub Profile
@aalmiray
aalmiray / Makefile
Created October 30, 2025 08:15
kordamp
.PHONY: build
build:
go get ./...
go build -o target/${GOOS}-${GOARCH}/ \
-ldflags "-X 'main.gmVersion=$(GM_VERSION)' -X 'main.gmBuildCommit=$(GIT_COMMIT)' -X 'main.gmBuildTimestamp=$(BUILD_TIMESTAMP)'" gm.go
@aalmiray
aalmiray / jreleaser.yml
Created July 27, 2025 12:45
jreleaser publish --yolo --packager docker
project:
version: '1.0.0-SNAPSHOT'
name: helloworld
description: HelloWorld in Java
longDescription: HelloWorld in Java
links:
homepage: https://github.com/jreleaser/helloworld-java-bin
authors:
- Andres Almiray
license: APACHE-2.0
@aalmiray
aalmiray / alerts.fxml
Last active March 17, 2024 07:51
BootstrapFX samples
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.text.Text?>
<?import javafx.scene.text.TextFlow?>
<Tab text="Alerts" closable="false">
<GridPane hgap="10" vgap="10" styleClass="page">
<padding>
@aalmiray
aalmiray / pom.xml
Created February 19, 2023 16:16
Piranha Embedded JLink application
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-License-Identifier: Apache-2.0
Copyright 2023 Andres Almiray.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@aalmiray
aalmiray / mastodon.java
Last active February 3, 2023 17:38
Post to Mastodon
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 11+
//REPOS jitpack
//REPOS mavencentral
//DEPS com.github.jreleaser.jreleaser:jreleaser-mastodon-java-sdk:main-a330172c0d-1
//DEPS org.slf4j:slf4j-simple:2.0.6
import org.jreleaser.sdk.mastodon.MastodonSdk;
import org.jreleaser.logging.SimpleJReleaserLoggerAdapter;
import java.util.List;
import static org.jreleaser.util.StringUtils.requireNonBlank;
@aalmiray
aalmiray / attach-artifacts.xml
Last active September 15, 2022 08:42
Running Gradle in Maven
<!-- attach copied JARs to build -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
@aalmiray
aalmiray / instructions.md
Last active September 13, 2022 22:50
JReleaser Workshop

Install

  1. The preferred choice is via sdkman: sdk install jreleaser
  2. Other choices available explained at https://github.com/jreleaser/jreleaser
  3. Depending of your choice you may need Java preinstalled (Java 8+)
  4. Verify the installation by invoking jreleaser -V. It should be version 1.2.0
  5. Also install 1.1.0 by invoking sdk install jreleaser 1.1.0.

GitHub setup

$ gm clean build
Using gradle at '/Users/aalmiray/dev/github/discocli/gradlew' to run buildFile '/Users/aalmiray/dev/github/discocli/build.gradle':
Downloading https://services.gradle.org/distributions/gradle-7.4.1-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%
Welcome to Gradle 7.4.1!
Here are the highlights of this release:
- Aggregated test and JaCoCo reports
- Marking additional test source directories as tests in IntelliJ
@aalmiray
aalmiray / dependencies
Created February 25, 2022 11:05
jfxcentral
$ ls -l target/libs/
total 155440
-rw-r--r-- 1 aalmiray staff 4243007 Feb 1 17:12 FXTrayIcon-3.1.2.jar
-rw-r--r-- 1 aalmiray staff 13349 Feb 1 17:12 JMemoryBuddy-0.5.1.jar
-rw-r--r-- 1 aalmiray staff 166895 Feb 1 17:12 JavaEWAH-1.1.13.jar
-rw-r--r-- 1 aalmiray staff 18614 Feb 1 17:12 annotations-15.0.jar
-rw-r--r-- 1 aalmiray staff 2388 Feb 1 17:12 audio-4.0.11.jar
-rw-r--r-- 1 aalmiray staff 2080 Feb 1 17:12 browser-4.0.11.jar
-rw-r--r-- 1 aalmiray staff 246918 Oct 5 2020 commons-beanutils-1.9.4.jar
-rw-r--r-- 1 aalmiray staff 588337 Apr 10 2019 commons-collections-3.2.2.jar
@aalmiray
aalmiray / SuperpomPlugin.groovy
Last active February 14, 2022 09:37
Example project showcasing the Gradle SuperPOM concept
package com.acme.gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.kordamp.gradle.plugin.project.ProjectPlugin
import org.kordamp.gradle.plugin.base.ProjectConfigurationExtension
class SuperpomPlugin implements Plugin<Project> {
void apply(Project project) {
project.plugins.apply(ProjectPlugin)