This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
forked from tommyettinger/textratypist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
131 lines (112 loc) · 4.03 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import org.gradle.api.JavaVersion
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
gradlePluginPortal()
}
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.25.3'
}
}
apply plugin: 'java-library'
apply plugin: 'com.vanniktech.maven.publish'
apply plugin: 'idea'
configure(allprojects) {
apply plugin: 'java-library'
apply plugin: 'com.vanniktech.maven.publish'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava {
options.incremental = true
sourceCompatibility = 8
targetCompatibility = 8
if (JavaVersion.current().isJava9Compatible()) {
options.release.set(8)
}
}
}
allprojects {
version = "$VERSION_NAME"
group = 'com.github.tommyettinger'
ext.projectName = 'TextraTypist'
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://jitpack.io' }
}
javadoc.options.source("17")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
compileJava {
sourceCompatibility = 8
targetCompatibility = 8
if (JavaVersion.current().isJava9Compatible()) {
options.release.set(8)
}
}
compileTestJava {
sourceCompatibility = 8
targetCompatibility = 8
if (JavaVersion.current().isJava9Compatible()) {
options.release.set(8)
}
}
def projectName = 'textratypist'
version = "$VERSION_NAME"
group = 'com.github.tommyettinger'
//api "com.github.tommyettinger:textratypist:0.10.0"
[compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
// Disable JDK 8's doclint
// http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc).tap {
configureEach {
// The -quiet is because of some sort of weird JDK JavaCompiler bug:
// https://discuss.gradle.org/t/passing-arguments-to-compiler-and-javadoc/1661
options.addStringOption('Xdoclint:none,-missing', '-quiet')
}
}
}
}
idea.module.excludeDirs += [file("docs/")]
sourceSets.test.resources.srcDirs = [file('src/test/resources').path, file('knownFonts').path]
javadoc.destinationDir = file('docs/apidocs')
processResources.duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
processTestResources.duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
jar {
archiveBaseName.set(projectName)
manifest {
attributes 'Implementation-Title': projectName, 'Implementation-Version': archiveVersion
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://jitpack.io' }
}
dependencies {
api "com.github.tommyettinger:regexodus:$regexodusVersion"
api "com.badlogicgames.gdx:gdx:$gdxVersion"
// don't require audio if a test doesn't need it; we don't use audio here.
testImplementation ("com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"){
exclude group: "org.jcraft", module: "jorbis"
exclude group: "org.lwjgl", module: "lwjgl-openal"
}
testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
testImplementation "com.rafaskoberg.gdx:typing-label:1.3.0"
testImplementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
testImplementation "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
testImplementation "com.github.raeleus.stripe:freetype:1.4.5"
testImplementation "com.github.raeleus.TenPatch:tenpatch:5.2.3"
testImplementation "com.github.tommyettinger:anim8-gdx:$anim8Version"
testImplementation 'com.github.tommyettinger:colorful:0.8.5'
}