Skip to content

Instantly share code, notes, and snippets.

View jhyry-gcpud's full-sized avatar

Jonathan Hyry jhyry-gcpud

  • Grant County PUD
  • Ephrata, WA
View GitHub Profile
@jhyry-gcpud
jhyry-gcpud / build.gradle
Created May 20, 2021 01:02 — forked from JonasGroeger/build.gradle
Gradle: Read git commit hash.
def getCheckedOutGitCommitHash() {
def gitFolder = "$projectDir/.git/"
def takeFromHash = 12
/*
* '.git/HEAD' contains either
* in case of detached head: the currently checked out commit hash
* otherwise: a reference to a file containing the current commit hash
*/
def head = new File(gitFolder + "HEAD").text.split(":") // .git/HEAD
def isCommit = head.length == 1 // e5a7c79edabbf7dd39888442df081b1c9d8e88fd
@jhyry-gcpud
jhyry-gcpud / build.gradle
Created November 3, 2020 08:32 — forked from slahn/build.gradle
SWT and JFace with Gradle and Kotlin
group 'example'
version '1.0-SNAPSHOT'
buildscript {
ext {
kotlin_version = '1.1.2-2'
osgi_platform = 'win32.win32.x86_64'
swt_version = '3.105.3'
}
@jhyry-gcpud
jhyry-gcpud / build.gradle
Created October 21, 2020 21:50 — forked from thombergs/build.gradle
Accessing the SVN revision number in a Gradle script
import org.tmatesoft.svn.core.wc.*
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.tmatesoft.svnkit', name: 'svnkit', version: '1.7.11'
}
}