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 / build.gradle
Last active May 5, 2020 12:35
Oracle JDBC
repositories {
mavenCentral()
}
dependencies {
implementation 'com.oracle.database.jdbc:ojdbc8:19.6.0.0'
implementation 'com.oracle.database.jdbc:ucp:19.6.0.0'
}
@aalmiray
aalmiray / build.gradle
Last active May 4, 2020 09:49
Kordamp settings for publishing to Maven Central via Bintray
plugins {
id 'java-library'
id 'org.kordamp.gradle.java-project' version '0.35.0'
id 'org.kordamp.gradle.bintray' version '0.35.0'
}
if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '**undefined**'
if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '**undefined**'
if (!project.hasProperty('sonatypeUsername')) ext.sonatypeUsername = '**undefined**'
if (!project.hasProperty('sonatypePassword')) ext.sonatypePassword = '**undefined**'
@aalmiray
aalmiray / base-pom.xml
Last active March 31, 2020 15:59
Mastering Maven 05
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme</groupId>
<artifactId>sample05</artifactId>
<version>0.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
@aalmiray
aalmiray / decrypt_secret.sh
Last active March 26, 2020 10:54
OCI Gradle Cache plugin
#!/bin/sh
gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_PASSPHRASE" \
--output $HOME/.github-secrets.tar .github-secrets.tar.gpg
tar xvf $HOME/.github-secrets.tar
@aalmiray
aalmiray / basic-pom.xml
Created March 11, 2020 16:04
MasteringMaven-04
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme</groupId>
<artifactId>sample04</artifactId>
<version>0.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
@aalmiray
aalmiray / Sample.java
Last active January 20, 2020 18:18
MasteringMaven-03
package com.acme;
import static org.apache.commons.lang3.StringUtils.capitalize;
public class Sample {
public String greeting() {
return capitalize("hello world");
}
public static void main(String[] args) {
@aalmiray
aalmiray / README.adoc
Created January 20, 2020 15:08
Mastering Maven

Mastering Maven

This repository contains the source code for all samples of the Mastering Maven blog series.

plugins {
id 'java-library'
id 'application'
id 'maven-publish'
id 'com.github.johnrengelman.shadow'
}
group = 'com.acme'
version = '0.0.0-SNAPSHOT'
buildscript {
repositories {
jcenter()
gradlePluginPortal()
}
dependencies {
classpath 'org.kordamp.gradle:oci-gradle-build-cache-plugin:0.3.0'
}
}
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2019 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
*
* http://www.apache.org/licenses/LICENSE-2.0