forked from libgdx/gdx-video
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
115 lines (96 loc) · 3.84 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
import com.diffplug.spotless.LineEnding
buildscript {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
google()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
classpath "org.docstr:gwt-gradle-plugin:$gwtPluginVersion"
classpath "com.android.tools.build:gradle:$androidPluginVersion"
classpath "com.mobidevelop.robovm:robovm-gradle-plugin:$robovmVersion"
classpath "com.badlogicgames.gdx:gdx-jnigen-gradle:2.4.1"
}
}
plugins {
id "com.diffplug.spotless" version "6.7.1"
}
ext {
projectGroup = "gdx-video"
}
allprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
ext {
minSdk = 17
targetSdk = 32
compileSdk = 32
buildTools = '33.0.2'
isReleaseBuild = {
return project.hasProperty("RELEASE")
}
isLocalBuild = {
return project.hasProperty("LOCAL")
}
getLocalRepositoryUrl = {
return project.hasProperty('LOCAL_REPOSITORY_URL') ? LOCAL_REPOSITORY_URL
: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath
}
getReleaseRepositoryUrl = {
return project.hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
getSnapshotRepositoryUrl = {
return project.hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
: "https://oss.sonatype.org/content/repositories/snapshots/"
}
getRepositoryUsername = {
return project.hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "$System.env.NEXUS_USERNAME"
}
getRepositoryPassword = {
return project.hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "$System.env.NEXUS_PASSWORD"
}
}
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
google()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
version project.getProperty('version') + (isReleaseBuild() ? "" : "-SNAPSHOT")
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(Test).configureEach {
systemProperty 'file.encoding', 'UTF-8'
}
}
subprojects {
apply plugin: "com.diffplug.spotless"
spotless {
lineEndings LineEnding.UNIX
java {
target 'src/**/*.java'
licenseHeader '/*******************************************************************************\n' +
' * Copyright $YEAR See AUTHORS file.\n' +
' *\n' +
' * Licensed under the Apache License, Version 2.0 (the "License");\n' +
' * you may not use this file except in compliance with the License.\n' +
' * You may obtain a copy of the License at\n' +
' *\n' +
' * http://www.apache.org/licenses/LICENSE-2.0\n' +
' *\n' +
' * Unless required by applicable law or agreed to in writing, software\n' +
' * distributed under the License is distributed on an "AS IS" BASIS,\n' +
' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n' +
' * See the License for the specific language governing permissions and\n' +
' * limitations under the License.\n' +
' ******************************************************************************/\n'
removeUnusedImports()
eclipse().configFile new File(rootProject.projectDir.absolutePath, 'eclipse-formatter.xml')
}
}
}