Skip to content

Commit

Permalink
Merge pull request #96 from sdnellen/master
Browse files Browse the repository at this point in the history
build fixes
  • Loading branch information
sdnellen authored Oct 21, 2024
2 parents f55ce78 + aaa4b74 commit 372d5e6
Show file tree
Hide file tree
Showing 9 changed files with 298 additions and 193 deletions.
32 changes: 8 additions & 24 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

# Never modify line endings of our bash scripts
*.sh -crlf
test/** -text

#
# The above will handle all files NOT found below
# https://help.github.com/articles/dealing-with-line-endings/
#
# These files are text and should be normalized (Convert crlf => lf)
*.css text
*.html text
*.java text
*.js text
*.json text
*.properties text
*.txt text
*.xml text
# Linux start script should use lf
/gradlew text eol=lf

# These files are binary and should be left untouched
# (binary is macro for -text -diff)
*.class binary
# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary
*.gif binary
*.jpg binary
*.png binary

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ hs_err_pid*
/.gradle/
!/gradle/wrapper/*.jar
/build/

# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
42 changes: 23 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,37 @@ version = versionMatcher[0][1]

buildscript {
repositories {
jcenter()
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.3'
}
}

apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'
apply plugin: 'java'
apply plugin: 'antlr'

repositories {
// Use jcenter for resolving my dependencies.
jcenter()
// Use Maven Central for resolving dependencies.
mavenCentral()
}

configurations {
compile {
extendsFrom = extendsFrom.findAll { it != configurations.antlr }
}
}

dependencies {
compile 'org.abego.treelayout:org.abego.treelayout.core:1.0.3'
antlr 'org.antlr:antlr4:4.5.3'
runtime 'org.antlr:antlr4-runtime:4.5.3'
antlr group: "org.antlr", name: "antlr4", version: "4.6"
compile group: "org.antlr", name: "antlr4-runtime", version: "4.6"
}

// make to resulting jar java 8 compatible for now
compileJava {
options.release = 8
}

final antlrSrc = 'src/ordt/parse/grammars'
Expand Down Expand Up @@ -81,20 +92,13 @@ generateGrammarSource {
}

shadowJar {
baseName = 'Ordt'
classifier = null

archiveBaseName.set('Ordt')
archiveClassifier.set('')
archiveVersion.set(version)

manifest {
attributes 'Main-Class': 'ordt.extract.Ordt'
}

dependencies {
// The antlr plugin adds the entire library to the jar file,
// not just the runtime, so remove this dependency. The runtime
// library is named antlr4-runtime, so it won't be affected by
// this exclude rule.
exclude(dependency('org.antlr:antlr4:.*'))
}
}

task distclean {
Expand Down
10 changes: 10 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
guava = "33.2.1-jre"
junit = "4.13.2"

[libraries]
guava = { module = "com.google.guava:guava", version.ref = "guava" }
junit = { module = "junit:junit", version.ref = "junit" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip
Loading

0 comments on commit 372d5e6

Please sign in to comment.