Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparations for Jitpack #41

Merged
merged 11 commits into from
May 20, 2022
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ project(":editor") {

project(":gdx-runtime") {
apply plugin: "java"
apply plugin: "java-library"


dependencies {
implementation project(":commons")
api project(":commons")
}
}

Expand Down
25 changes: 25 additions & 0 deletions commons/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
apply plugin: "java"
apply plugin: "maven-publish"

group = 'com.github.jpooleycodes.mundus'
version = '0.3.0'

sourceCompatibility = 1.7
targetCompatibility = 1.7
Expand All @@ -9,3 +13,24 @@ sourceSets.main.resources.srcDirs = ["src/main"]

sourceSets.test.java.srcDirs = ["src/test"]
sourceSets.test.resources.srcDirs = ["src/test"]

task sourcesJar(type: Jar, dependsOn: classes) {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
classifier = 'sources'
from sourceSets.main.allSource
}

publishing {
Dgzt marked this conversation as resolved.
Show resolved Hide resolved
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
artifact sourcesJar
}
}
}



6 changes: 3 additions & 3 deletions editor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ project.ext.assetsDir = new File("assets");


task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
main(project.mainClassName)
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
Expand All @@ -22,8 +22,8 @@ task run(dependsOn: classes, type: JavaExec) {
}

task distEditor(type: Jar) {
baseName = 'Mundus'
version = '0.3.0'
archivesBaseName = 'Mundus'
archiveVersion.set('0.3.0')

duplicatesStrategy(DuplicatesStrategy.EXCLUDE)

Expand Down
43 changes: 19 additions & 24 deletions gdx-runtime/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
apply plugin: "java"
apply plugin: "maven-publish"

group = 'com.github.jpooleycodes.mundus'
version = '0.3.0'

sourceSets.main.java.srcDirs = ["src/"]
sourceSets.main.resources.srcDirs = ["src/"]

def VERSION = '0.3.0'
def NAME = 'mundus-gdx-runtime'

task distRuntime(type: Jar, dependsOn: classes) {
baseName = NAME
version = VERSION

dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}

distRuntime.dependsOn classes

task distRuntimeSources(type: Jar, dependsOn: classes) {
baseName = NAME
version = VERSION
classifier = 'sources'

task sourcesJar(type: Jar, dependsOn: classes) {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)

from files(sourceSets.main.allSource)
from("../commons/src/main")
archiveClassifier.set('sources')
from sourceSets.main.allSource
}

publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
artifact sourcesJar
}
}
}