Skip to content

Commit 372d5e6

Browse files
authored
Merge pull request #96 from sdnellen/master
build fixes
2 parents f55ce78 + aaa4b74 commit 372d5e6

File tree

9 files changed

+298
-193
lines changed

9 files changed

+298
-193
lines changed

.gitattributes

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,12 @@
1-
# Handle line endings automatically for files detected as text
2-
# and leave all files detected as binary untouched.
3-
* text=auto
4-
5-
# Never modify line endings of our bash scripts
6-
*.sh -crlf
7-
test/** -text
8-
91
#
10-
# The above will handle all files NOT found below
2+
# https://help.github.com/articles/dealing-with-line-endings/
113
#
12-
# These files are text and should be normalized (Convert crlf => lf)
13-
*.css text
14-
*.html text
15-
*.java text
16-
*.js text
17-
*.json text
18-
*.properties text
19-
*.txt text
20-
*.xml text
4+
# Linux start script should use lf
5+
/gradlew text eol=lf
216

22-
# These files are binary and should be left untouched
23-
# (binary is macro for -text -diff)
24-
*.class binary
7+
# These are Windows script files and should use crlf
8+
*.bat text eol=crlf
9+
10+
# Binary files should be left untouched
2511
*.jar binary
26-
*.gif binary
27-
*.jpg binary
28-
*.png binary
12+

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@ hs_err_pid*
3838
/.gradle/
3939
!/gradle/wrapper/*.jar
4040
/build/
41+
42+
# Ignore Gradle project-specific cache directory
43+
.gradle
44+
45+
# Ignore Gradle build output directory
46+
build

build.gradle

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,37 @@ version = versionMatcher[0][1]
99

1010
buildscript {
1111
repositories {
12-
jcenter()
12+
// Use Maven Central for resolving dependencies.
13+
mavenCentral()
1314
}
1415
dependencies {
15-
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
16+
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.3'
1617
}
1718
}
1819

19-
apply plugin: 'com.github.johnrengelman.shadow'
20+
apply plugin: 'com.gradleup.shadow'
2021
apply plugin: 'java'
2122
apply plugin: 'antlr'
2223

2324
repositories {
24-
// Use jcenter for resolving my dependencies.
25-
jcenter()
25+
// Use Maven Central for resolving dependencies.
26+
mavenCentral()
27+
}
28+
29+
configurations {
30+
compile {
31+
extendsFrom = extendsFrom.findAll { it != configurations.antlr }
32+
}
2633
}
2734

2835
dependencies {
29-
compile 'org.abego.treelayout:org.abego.treelayout.core:1.0.3'
30-
antlr 'org.antlr:antlr4:4.5.3'
31-
runtime 'org.antlr:antlr4-runtime:4.5.3'
36+
antlr group: "org.antlr", name: "antlr4", version: "4.6"
37+
compile group: "org.antlr", name: "antlr4-runtime", version: "4.6"
38+
}
39+
40+
// make to resulting jar java 8 compatible for now
41+
compileJava {
42+
options.release = 8
3243
}
3344

3445
final antlrSrc = 'src/ordt/parse/grammars'
@@ -81,20 +92,13 @@ generateGrammarSource {
8192
}
8293

8394
shadowJar {
84-
baseName = 'Ordt'
85-
classifier = null
86-
95+
archiveBaseName.set('Ordt')
96+
archiveClassifier.set('')
97+
archiveVersion.set(version)
98+
8799
manifest {
88100
attributes 'Main-Class': 'ordt.extract.Ordt'
89101
}
90-
91-
dependencies {
92-
// The antlr plugin adds the entire library to the jar file,
93-
// not just the runtime, so remove this dependency. The runtime
94-
// library is named antlr4-runtime, so it won't be affected by
95-
// this exclude rule.
96-
exclude(dependency('org.antlr:antlr4:.*'))
97-
}
98102
}
99103

100104
task distclean {

gradle/libs.versions.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
3+
4+
[versions]
5+
guava = "33.2.1-jre"
6+
junit = "4.13.2"
7+
8+
[libraries]
9+
guava = { module = "com.google.guava:guava", version.ref = "guava" }
10+
junit = { module = "junit:junit", version.ref = "junit" }

gradle/wrapper/gradle-wrapper.jar

-10.9 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
36
zipStoreBase=GRADLE_USER_HOME
47
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip

0 commit comments

Comments
 (0)