This repository has been archived on 2025-03-13. You can view files and clone it, but cannot push or open issues or pull requests.
pixel-backend-libgdx/build.gradle

133 lines
4.0 KiB
Groovy

plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
}
group = 'com.openeggbert.pixel'
version = '0.0.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
maven { url 'https://s01.oss.sonatype.org' }
gradlePluginPortal()
mavenLocal()
google()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://repo.openeggbert.com/releases/' }
maven { url 'https://repo.openeggbert.com/snapshots/' }
}
dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.3"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.3"
testImplementation 'org.mockito:mockito-core:5.5.0'
testImplementation 'org.mockito:mockito-junit-jupiter:3.6.0'
api "com.badlogicgames.gdx-controllers:gdx-controllers-core:$gdxControllersVersion"
api "com.badlogicgames.gdx:gdx-ai:$aiVersion"
api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
api "com.github.MrStahlfelge.gdx-websockets:core:$websocketVersion"
api "com.github.MrStahlfelge.gdx-websockets:serialization:$websocketSerializationVersion"
api "com.github.crykn.guacamole:core:$guacamoleVersion"
api "com.github.crykn.guacamole:gdx:$guacamoleVersion"
api "com.github.tommyettinger:formic:$formicVersion"
api "com.github.tommyettinger:libgdx-utils-box2d:$utilsBox2dVersion"
api "com.github.tommyettinger:libgdx-utils:$utilsVersion"
api "de.golfgl.gdxcontrollerutils:gdx-controllerutils-mapping:$controllerMappingVersion"
api "games.rednblack.miniaudio:miniaudio:$miniaudioVersion"
//api "com.openeggbert.gdx:gdx-storage:0.0.0-SNAPSHOT"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.3"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.3"
implementation "com.openeggbert.pixel:pixel-framework:$pixelVersion"
implementation "com.github.earlygrey:shapedrawer:$shapeDrawerVersion"
}
sourceCompatibility = '11'
targetCompatibility = '11'
tasks.withType(JavaCompile) {
options.incremental = true
options.encoding = 'UTF-8'
}
test {
useJUnitPlatform()
}
eclipse {
project {
name = 'pixel-backend-libgdx'
}
}
sourceSets.main.java.srcDirs = [ "src/main/java/" ]
sourceSets.test.java.srcDirs = [ "src/test/java/" ]
idea {
module {
outputDir = file('build/classes/java/main')
testOutputDir = file('build/classes/java/test')
}
}
// Include Pixel.gwt.xml in the JAR without moving it
jar {
from(sourceSets.main.allSource) {
include 'com/openeggbert/pixel/backend/pixelbackendlibgdx.gwt.xml'
}
}
def credentialsProperties = new Properties()
file("credentials.properties").withInputStream { stream ->
credentialsProperties.load(stream)
}
// Define sourceJar and javadocJar tasks
task sourceJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier.set('sources')
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier.set('javadoc')
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId 'pixel-backend-libgdx'
groupId 'com.openeggbert.pixel'
from components.java
artifact sourceJar
artifact javadocJar
}
}
repositories {
maven {
name = version.endsWith('SNAPSHOT') ? 'openeggbert-snapshots' : 'openeggbert-releases'
url = version.endsWith('SNAPSHOT') ? uri("https://repo.openeggbert.com/snapshots") : uri("https://repo.openeggbert.com/releases")
credentials {
username = credentialsProperties['repoUsername']
password = credentialsProperties['repoPassword']
}
}
}
}