From 077d0afcaf218db35553dbb4fdf764e276c00ba7 Mon Sep 17 00:00:00 2001 From: SimonIT Date: Tue, 26 Nov 2019 22:58:08 +0100 Subject: make this framework deliver source and javadoc jars, renamed build to generateAssets task because of custom build tasks are not allowed when using the standard Gradle lifecycle plugins --- README.md | 1 + assets/build.gradle | 6 +++--- build.gradle | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 928bdce..2006aea 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # gdx-boardgame +[![](https://jitpack.io/v/jeremyz/gdx-boardgame.svg)](https://jitpack.io/#jeremyz/gdx-boardgame) is a [libgdx](https://libgdx.badlogicgames.com/) based framework to build 2D boardgames. diff --git a/assets/build.gradle b/assets/build.gradle index 4b37476..cf35be1 100644 --- a/assets/build.gradle +++ b/assets/build.gradle @@ -6,7 +6,7 @@ dependencies { texturePacker "com.badlogicgames.gdx:gdx-tools:$gdxVersion" } -defaultTasks 'build' +defaultTasks 'generateAssets' task packLoading(type: JavaExec) { main = 'com.badlogic.gdx.tools.texturepacker.TexturePacker' @@ -20,10 +20,10 @@ task packHexOverlays(type: JavaExec) { args = ['hex-overlays', 'data', 'hex-overlays'] } -task build() { +task generateAssets() { description "Builds the skin at various DPIs" } -build.dependsOn { +generateAssets.dependsOn { tasks.findAll { task -> task.name.startsWith('pack') } } diff --git a/build.gradle b/build.gradle index 090f805..5522d34 100644 --- a/build.gradle +++ b/build.gradle @@ -42,10 +42,26 @@ project(":test") { project(":core") { apply plugin: "java" + apply plugin: "maven" dependencies { implementation "com.badlogicgames.gdx:gdx:$gdxVersion" } + + task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource + } + + task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir + } + + artifacts { + archives sourcesJar + archives javadocJar + } } project(":assets") { -- cgit v1.1-2-g2b99