-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
145 lines (123 loc) · 4.22 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "com.badlogicgames.gdx:gdx-jnigen-gradle:2.3.1"
}
}
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = "com.bearwaves"
version = "1.3.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation "com.badlogicgames.gdx:gdx-backend-lwjgl3:1.11.0"
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
}
sourceSets {
main {
resources {
srcDirs = [
"libs/macosx64",
"libs/macosxarm64",
"libs/windows64",
"libs/linux64",
]
}
}
}
tasks.named('test') {
sourceSets.test.resources.srcDirs += "jni/EOS/SDK/Bin"
def localProperties = new Properties()
def propertiesFile = rootProject.file("local.properties")
if (propertiesFile.exists()) {
localProperties.load(propertiesFile.newDataInputStream())
}
environment "EOS4J_TEST_PRODUCT_ID", localProperties.getProperty("EOS4J_TEST_PRODUCT_ID") ?: System.getenv("EOS4J_TEST_PRODUCT_ID")
environment "EOS4J_TEST_SANDBOX_ID", localProperties.getProperty("EOS4J_TEST_SANDBOX_ID") ?: System.getenv("EOS4J_TEST_SANDBOX_ID")
environment "EOS4J_TEST_DEPLOYMENT_ID", localProperties.getProperty("EOS4J_TEST_DEPLOYMENT_ID") ?: System.getenv("EOS4J_TEST_DEPLOYMENT_ID")
environment "EOS4J_TEST_CLIENT_ID", localProperties.getProperty("EOS4J_TEST_CLIENT_ID") ?: System.getenv("EOS4J_TEST_CLIENT_ID")
environment "EOS4J_TEST_CLIENT_SECRET", localProperties.getProperty("EOS4J_TEST_CLIENT_SECRET") ?: System.getenv("EOS4J_TEST_CLIENT_SECRET")
useJUnitPlatform()
}
apply plugin: "com.badlogicgames.gdx.gdx-jnigen"
jnigen {
sharedLibName = "eos4j"
nativeCodeGenerator {
sourceDir = "src/main/java"
}
all {
headerDirs = ["EOS/SDK/Include", "cpp"]
cppFlags += " -std=c++17 "
cppExcludes += "EOS/**"
}
add(Windows, x64) {
libraries += "-L" + file("./jni/EOS/SDK/Lib").absolutePath + " -lEOSSDK-Win64-Shipping"
}
add(MacOsX, x64) {
libraries += "-L" + file("./jni/EOS/SDK/Bin").absolutePath + " -lEOSSDK-Mac-Shipping"
}
add(MacOsX, x64, ARM) {
libraries += "-L" + file("./jni/EOS/SDK/Bin").absolutePath + " -lEOSSDK-Mac-Shipping"
}
add(Linux, x64) {
libraries += "-L" + file("./jni/EOS/SDK/Bin").absolutePath + " -lEOSSDK-Linux-Shipping"
}
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
maven(MavenPublication) {
artifactId = "eos4j"
from components.java
pom {
name = "eos4j"
description = "Java wrapper for Epic Online Services SDK"
url = "https://github.com/Bearwaves/eos4j"
developers {
developer {
id = 'JoelOtter'
name = 'Joel Auterson'
email = '[email protected]'
}
}
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
scm {
connection = 'scm:git:https://github.com/Bearwaves/eos4j.git'
developerConnection = 'scm:git:https://github.com/Bearwaves/eos4j.git'
url = 'https://github.com/Bearwaves/eos4j'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials(PasswordCredentials)
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}