This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
175 lines (161 loc) · 5.67 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
allprojects {
apply plugin: "java-library"
group 'io.github.anyicomplex'
sourceCompatibility = 1.8
ext {
gdxVersion = '1.10.0'
versionSuffix = '-beta5'
gdxControllersVersion = '2.2.1'
graalvmVersion = '22.0.0'
}
repositories {
mavenCentral()
}
dependencies {
api "org.graalvm.nativeimage:svm:$graalvmVersion"
}
}
version gdxVersion + versionSuffix
dependencies {
implementation "com.badlogicgames.gdx:gdx:$gdxVersion"
}
subprojects {
dependencies {
implementation project(":")
}
}
project(":backends:lwjgl3") {
version gdxVersion + versionSuffix
dependencies {
// Compile GraalVM platform library
compileOnly "org.graalvm.nativeimage:svm-hosted-native-linux-amd64:$graalvmVersion"
compileOnly "org.graalvm.nativeimage:svm-hosted-native-windows-amd64:$graalvmVersion"
compileOnly "org.graalvm.nativeimage:svm-hosted-native-darwin-amd64:$graalvmVersion"
implementation "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
}
}
project(":extensions:box2d") {
version gdxVersion + versionSuffix
dependencies {
implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
}
}
project(":extensions:bullet") {
version gdxVersion + versionSuffix
dependencies {
implementation "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
}
}
project(":extensions:freetype") {
version gdxVersion + versionSuffix
dependencies {
implementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
}
}
project(":extensions:controllers-lwjgl3") {
version gdxControllersVersion + versionSuffix
dependencies {
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-desktop:$gdxControllersVersion"
}
}
project(":extensions:controllers-moe") {
version gdxControllersVersion + versionSuffix
dependencies {
//Dependencies coming
}
}
configure([
project(":"),
project(":backends:lwjgl3"),
project(":backends:moe"),
project(":extensions:box2d"),
project(":extensions:bullet"),
project(":extensions:freetype"),
project(":extensions:controllers-lwjgl3"),
//project(":extensions:controllers-moe"),
]) {
apply plugin: 'maven-publish'
apply plugin: 'signing'
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
def idStr = rootProject.name
if (project.name != rootProject.name) {
idStr += "-"
idStr += project.parent.name.substring(0, project.parent.name.length() - 1)
idStr += "-"
idStr += project.name
}
artifactId = idStr
groupId = project.group
version = project.version
from components.java
pom {
def nameStr = "Gdx GraalVM Native Image Helper"
if (project.name != rootProject.name) {
nameStr += " ("
nameStr += project.parent.name.substring(0, 1).toUpperCase()
nameStr += project.parent.name.substring(1, project.parent.name.length() - 1)
nameStr += " "
nameStr += project.name.substring(0, 1).toUpperCase()
nameStr += project.name.substring(1, project.name.length())
nameStr += ")"
}
name = nameStr
description = 'Experimental helper for libGDX to build GraalVM Native Image.'
url = 'https://github.com/anyicomplex/gdx-svmhelper'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'anyicomplex'
name = 'Yi An'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/anyicomplex/gdx-svmhelper.git'
developerConnection = 'scm:git:[email protected]:anyicomplex/gdx-svmhelper.git'
url = 'https://github.com/anyicomplex/gdx-svmhelper/tree/main'
}
}
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
repositories {
maven {
name = "OSSRH"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
if (project.version.endsWith("-SNAPSHOT")) {
url "https://s01.oss.sonatype.org/content/repositories/snapshots"
} else {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
}
}
}
}
signing {
def key = System.getenv("SIGNING_KEY")
def password = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(key, password)
sign publishing.publications.mavenJava
}
}