allprojects { apply plugin: 'java-library' group = 'org.jogamp.ardor3d' version = '1.0-SNAPSHOT' } subprojects { apply plugin: 'java' sourceCompatibility = 17 targetCompatibility = 17 tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } task packageSources(type: Jar) { archiveClassifier = 'sources' from sourceSets.main.allSource } artifacts.archives packageSources repositories { mavenLocal() maven { url "https://oss.sonatype.org/content/repositories/snapshots" } maven { url "https://repo.maven.apache.org/maven2" } maven { url "https://jogamp.org/deployment/maven" } maven { url "https://swt-repo.googlecode.com/svn/repo/" } } configurations.all { resolutionStrategy { dependencySubstitution { // The maven property ${osgi.platform} is not handled by Gradle // so we replace the dependency, using the osgi platform from the project settings def os = System.getProperty("os.name").toLowerCase() if (os.contains("windows")) { substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') using module("org.eclipse.platform:org.eclipse.swt.win32.win32.x86_64:3.106.3") } else if (os.contains("linux")) { substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') using module("org.eclipse.platform:org.eclipse.swt.gtk.linux.x86_64:3.106.3") } else if (os.contains("mac")) { substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') using module("org.eclipse.platform:org.eclipse.swt.cocoa.macosx.x86_64:3.106.3") } } } } dependencies { testImplementation group: 'junit', name: 'junit', version:'4.13.2' testImplementation group: 'org.easymock', name: 'easymock', version:'5.1.0' } }