From 88db91fbff613f058da9815a340f8f93cd479e5e Mon Sep 17 00:00:00 2001 From: Sung Powley Date: Mon, 3 Apr 2023 01:18:17 -0400 Subject: [PATCH 1/2] Add back Android demo module #64 --- build.gradle | 52 ++++----- demo/android/AndroidManifest.xml | 43 ++++---- demo/android/build.gradle | 100 ++++++------------ .../net/mgsx/gltf/demo/AndroidLauncher.java | 2 +- demo/core/build.gradle | 21 +--- demo/desktop/build.gradle | 73 ++++++------- gltf/build.gradle | 25 ++--- gradle/wrapper/gradle-wrapper.properties | 5 +- ibl-composer/build.gradle | 79 ++++++-------- settings.gradle | 4 +- 10 files changed, 162 insertions(+), 242 deletions(-) diff --git a/build.gradle b/build.gradle index 5349cc33..99ede6bb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,47 +1,37 @@ buildscript { repositories { - mavenCentral() - maven { url 'https://s01.oss.sonatype.org' } - mavenLocal() - google() gradlePluginPortal() - maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } - maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } + google() + mavenLocal() + mavenCentral() + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { - classpath "org.wisepersist:gwt-gradle-plugin:$gwtPluginVersion" + classpath 'com.android.tools.build:gradle:7.4.2' } } + allprojects { + group = 'com.github.mgsx-dev.gdx-gltf' + version = '2.1.0' - group = 'com.github.mgsx-dev.gdx-gltf' - version = '2.1.0' - - apply plugin: "eclipse" - apply plugin: "idea" -} -configure(subprojects) { - apply plugin: 'java-library' - compileJava { - options.incremental = true + ext { + gdxVersion = '1.11.0' + junitVersion = '4.13.2' } -} -subprojects { - ext { - gdxVersion = '1.9.11' - junitVersion = '4.12' - } - - apply plugin: 'maven-publish' - + repositories { - mavenCentral() - maven { url 'https://s01.oss.sonatype.org' } - mavenLocal() gradlePluginPortal() - maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } - maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } + google() + mavenLocal() + mavenCentral() + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + maven { url "https://oss.sonatype.org/content/repositories/releases/" } + maven { url "https://jitpack.io" } } + + apply plugin: "eclipse" + apply plugin: "idea" } eclipse.project.name = "gltf-root" diff --git a/demo/android/AndroidManifest.xml b/demo/android/AndroidManifest.xml index 2bdf89c6..51d3f0fc 100644 --- a/demo/android/AndroidManifest.xml +++ b/demo/android/AndroidManifest.xml @@ -1,26 +1,29 @@ + package="net.mgsx.gltf.demo" + android:versionCode="4" + android:versionName="0.0.4"> - + + + + + + + + - - - - - - - - + diff --git a/demo/android/build.gradle b/demo/android/build.gradle index d25c569e..da8c3f87 100644 --- a/demo/android/build.gradle +++ b/demo/android/build.gradle @@ -1,17 +1,10 @@ -buildscript { - dependencies { - classpath 'com.android.tools.build:gradle:2.2.0' - } -} - -apply plugin: "android" +apply plugin: "com.android.application" configurations { natives } dependencies { - compile project(":demo:core") - compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" - natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi" + implementation project(":demo:core") + implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" @@ -20,8 +13,7 @@ dependencies { } android { - buildToolsVersion "28.0.3" - compileSdkVersion 29 + compileSdkVersion 33 sourceSets { main { manifest.srcFile 'AndroidManifest.xml' @@ -33,15 +25,15 @@ android { jniLibs.srcDirs = ['libs'] } - instrumentTest.setRoot('tests') + androidTest.setRoot('tests') } packagingOptions { exclude 'META-INF/robovm/ios/robovm.xml' } defaultConfig { applicationId "net.mgsx.gltf.demo" - minSdkVersion 9 - targetSdkVersion 29 + minSdkVersion 24 + targetSdkVersion 33 versionCode 4 versionName "0.0.4" } @@ -57,30 +49,38 @@ android { // called every time gradle gets executed, takes the native dependencies of // the natives configuration, and extracts them to the proper libs/ folders // so they get packed with the APK. -task copyAndroidNatives() { - file("libs/armeabi/").mkdirs(); - file("libs/armeabi-v7a/").mkdirs(); - file("libs/arm64-v8a/").mkdirs(); - file("libs/x86_64/").mkdirs(); - file("libs/x86/").mkdirs(); - - configurations.natives.files.each { jar -> - def outputDir = null - if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a") - if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a") - if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi") - if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64") - if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86") - if(outputDir != null) { - copy { - from zipTree(jar) - into outputDir - include "*.so" +task copyAndroidNatives() { + doFirst { + file("libs/armeabi/").mkdirs() + file("libs/armeabi-v7a/").mkdirs() + file("libs/arm64-v8a/").mkdirs() + file("libs/x86_64/").mkdirs() + file("libs/x86/").mkdirs() + + configurations.natives.copy().files.each { jar -> + def outputDir = null + if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a") + if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a") + if (jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi") + if (jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64") + if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86") + if (outputDir != null) { + copy { + from zipTree(jar) + into outputDir + include "*.so" + } } } } } +tasks.whenTaskAdded { packageTask -> + if (packageTask.name.contains("package")) { + packageTask.dependsOn "copyAndroidNatives" + } +} + task run(type: Exec) { def path def localProperties = project.file("../local.properties") @@ -103,42 +103,10 @@ task run(type: Exec) { commandLine "$adb", 'shell', 'am', 'start', '-n', 'com.mygdx.game/com.mygdx.game.AndroidLauncher' } -// sets up the Android Eclipse project, using the old Ant based build. -eclipse { - // need to specify Java source sets explicitly, SpringSource Gradle Eclipse plugin - // ignores any nodes added in classpath.file.withXml - sourceSets { - main { - java.srcDirs "src", 'gen' - } - } - - jdt { - sourceCompatibility = 1.6 - targetCompatibility = 1.6 - } - - classpath { - plusConfigurations += [ project.configurations.compile ] - containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES' - } - - project { - name = appName + "-android" - natures 'com.android.ide.eclipse.adt.AndroidNature' - buildCommands.clear(); - buildCommand "com.android.ide.eclipse.adt.ResourceManagerBuilder" - buildCommand "com.android.ide.eclipse.adt.PreCompilerBuilder" - buildCommand "org.eclipse.jdt.core.javabuilder" - buildCommand "com.android.ide.eclipse.adt.ApkBuilder" - } -} - // sets up the Android Idea project, using the old Ant based build. idea { module { sourceDirs += file("src"); - scopes = [ COMPILE: [plus:[project.configurations.compile]]] iml { withXml { diff --git a/demo/android/src/net/mgsx/gltf/demo/AndroidLauncher.java b/demo/android/src/net/mgsx/gltf/demo/AndroidLauncher.java index 5de7271f..85c5dc3d 100644 --- a/demo/android/src/net/mgsx/gltf/demo/AndroidLauncher.java +++ b/demo/android/src/net/mgsx/gltf/demo/AndroidLauncher.java @@ -12,6 +12,6 @@ protected void onCreate (Bundle savedInstanceState) { GLTFDemo.AUTOLOAD_ENTRY = "BoomBox"; GLTFDemo.AUTOLOAD_VARIANT = "glTF"; AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); - initialize(new GLTFDemo(), config); + initialize(new GLTFDemo("models"), config); } } diff --git a/demo/core/build.gradle b/demo/core/build.gradle index 6d83555b..320645f4 100644 --- a/demo/core/build.gradle +++ b/demo/core/build.gradle @@ -1,17 +1,13 @@ apply plugin: "java" dependencies { - - api project(":gltf") - - api "com.badlogicgames.gdx:gdx:$gdxVersion" - + implementation project(":gltf") + implementation "com.badlogicgames.gdx:gdx:$gdxVersion" testImplementation "junit:junit:$junitVersion" testImplementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" } -sourceCompatibility = 1.7 [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' sourceSets.main.java.srcDirs = [ "src/" ] @@ -19,15 +15,4 @@ sourceSets.main.resources.srcDirs = ["src"] sourceSets.test.java.srcDirs = [ "test/" ] -eclipse.project.name = appName + "-core" - -publishing { - publications { - maven(MavenPublication) { - groupId project.group - artifactId project.name - version project.version - from components.java - } - } -} \ No newline at end of file +eclipse.project.name = appName + "-core" \ No newline at end of file diff --git a/demo/desktop/build.gradle b/demo/desktop/build.gradle index e4842715..e1ac5865 100644 --- a/demo/desktop/build.gradle +++ b/demo/desktop/build.gradle @@ -1,58 +1,55 @@ -apply plugin: 'application' +apply plugin: 'java' dependencies { - api project(":demo:core") + implementation project(":demo:core") implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" + implementation project(path: ':gltf') } - -sourceCompatibility = 1.7 + sourceSets.main.java.srcDirs = [ "src/" ] sourceSets.test.java.srcDirs = [ "test/" ] project.ext.mainClassName = "net.mgsx.gltf.demo.DesktopLauncher" project.ext.assetsDir = new File("../android/assets"); -run { - workingDir = '../android/assets' - setIgnoreExitValue(true) + +task run(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true } -jar { - archiveBaseName.set("$appName-desktop") - duplicatesStrategy(DuplicatesStrategy.EXCLUDE) - dependsOn configurations.runtimeClasspath - from '../android/assets' - exclude 'models' - from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } - exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA') - dependencies { - exclude('META-INF/INDEX.LIST', 'META-INF/maven/**') - } +task debug(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true + debug = true +} + +task distDesktop(type: Jar, dependsOn: [classes]) { + from files(sourceSets.main.output.classesDirs) + from files(sourceSets.main.output.resourcesDir) + from {configurations.compile.collect {zipTree(it)}} + from files(project.assetsDir) + + exclude("models") + + // additional files could be added like this : + // from file("$projectDir/LICENSE"); + manifest { attributes 'Main-Class': project.mainClassName } doLast { - file(archiveFile).setExecutable(true, false) + file(archivePath).setExecutable(true, false) } } - -task distDesktop(dependsOn: [jar]) { -} - -eclipse { - project { - name = appName + "-desktop" - } -} - -publishing { - publications { - maven(MavenPublication) { - groupId project.group - artifactId project.name - version project.version - from components.java - } - } +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } \ No newline at end of file diff --git a/gltf/build.gradle b/gltf/build.gradle index 87fc330d..75c28e58 100644 --- a/gltf/build.gradle +++ b/gltf/build.gradle @@ -1,22 +1,23 @@ eclipse.project.name = "gdx-gltf" +apply plugin: "java" + dependencies { - api "com.badlogicgames.gdx:gdx:$gdxVersion" - + implementation "com.badlogicgames.gdx:gdx:$gdxVersion" testImplementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" testImplementation "junit:junit:$junitVersion" } -sourceCompatibility = 1.7 sourceSets.main.java.srcDirs = [ "src" ] sourceSets.main.resources.srcDirs = ["src"] sourceSets.test.java.srcDirs = [ "test" ] sourceSets.test.resources.srcDirs = ["testRes"] +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + task sourcesJar(type: Jar) { duplicatesStrategy = 'exclude' - classifier = 'sources' from sourceSets.main.allSource } @@ -24,20 +25,12 @@ javadoc { failOnError = false } -[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' - java { withSourcesJar() withJavadocJar() } -publishing { - publications { - maven(MavenPublication) { - groupId project.group - artifactId project.name - version project.version - from components.java - } - } -} +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fce..85fd61dc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Mon Apr 03 00:42:37 EDT 2023 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/ibl-composer/build.gradle b/ibl-composer/build.gradle index e22b7ffa..cd1aaeb2 100644 --- a/ibl-composer/build.gradle +++ b/ibl-composer/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'application' +apply plugin: 'java' ext { appName = "gdx-gltf-ibl-composer" @@ -8,16 +8,13 @@ eclipse.project.name = appName dependencies { - api project(":gltf") - - api "com.badlogicgames.gdx:gdx:$gdxVersion" - + implementation project(":gltf") + implementation "com.badlogicgames.gdx:gdx:$gdxVersion" implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" } -sourceCompatibility = 1.8 sourceSets.main.java.srcDirs = [ "src/" ] sourceSets.main.resources.srcDirs = ["src"] sourceSets.test.java.srcDirs = [ "test/" ] @@ -26,54 +23,40 @@ project.ext.mainClassName = "net.mgsx.gltf.ibl.IBLComposerLauncher" project.ext.assetsDir = new File("assets"); -run { - workingDir = 'assets' - setIgnoreExitValue(true) +task run(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true } -jar { - archiveBaseName.set('IBL-Composer') - duplicatesStrategy(DuplicatesStrategy.EXCLUDE) - dependsOn configurations.runtimeClasspath - from 'assets' - from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } - exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA') - dependencies { - exclude('META-INF/INDEX.LIST', 'META-INF/maven/**') - } +task debug(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true + debug = true +} + +task distIBL(type: Jar, dependsOn: [classes]) { + from files(sourceSets.main.output.classesDirs) + from files(sourceSets.main.output.resourcesDir) + from {configurations.compile.collect {zipTree(it)}} + from files(project.assetsDir) + + // additional files could be added like this : + // from file("$projectDir/LICENSE"); + manifest { attributes 'Main-Class': project.mainClassName } doLast { - file(archiveFile).setExecutable(true, false) + file(archivePath).setExecutable(true, false) } } - -task distIBL(dependsOn: [jar]) { -} - -task sourcesJar(type: Jar) { - duplicatesStrategy = 'exclude' - classifier = 'sources' - from sourceSets.main.allSource -} - -javadoc { - failOnError = false -} - java { - withSourcesJar() - withJavadocJar() -} - -publishing { - publications { - maven(MavenPublication) { - groupId project.group - artifactId project.name - version project.version - from components.java - } - } -} + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index d45a6106..3ea0f910 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,7 +3,7 @@ include ":gltf" include ":demo" include ":demo:core" include ":demo:desktop" -// include ":demo:android" -include ":demo:html" +include ":demo:android" +//include ":demo:html" include ":ibl-composer" \ No newline at end of file From 56cb3ec4fe54dbc5e90265d89da365cf0002a408 Mon Sep 17 00:00:00 2001 From: Sung Powley Date: Thu, 27 Apr 2023 00:51:00 -0400 Subject: [PATCH 2/2] #64 revisions: working demo for desktop, html, and Android Android demo now works without conflict with HTML, desktop demos. Android Gradle Plugin / Gradle versions cannot exceed the following without unresolved errors. Android Gradle Plugin Version: 7.4.2 Gradle Version: 7.5.1 --- build.gradle | 57 ++--- demo/android/AndroidManifest.xml | 1 - demo/android/build.gradle | 210 ++++++++++-------- .../net/mgsx/gltf/demo/AndroidLauncher.java | 16 +- demo/core/build.gradle | 21 +- demo/desktop/build.gradle | 82 +++---- demo/html/build.gradle | 160 ++++++------- gltf/build.gradle | 36 +-- gradle/wrapper/gradle-wrapper.properties | 6 +- ibl-composer/build.gradle | 83 +++---- settings.gradle | 2 +- 11 files changed, 360 insertions(+), 314 deletions(-) diff --git a/build.gradle b/build.gradle index 99ede6bb..5209f0ae 100644 --- a/build.gradle +++ b/build.gradle @@ -1,37 +1,38 @@ buildscript { - repositories { - gradlePluginPortal() - google() - mavenLocal() - mavenCentral() - maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } - } - dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' - } + repositories { + gradlePluginPortal() + google() + mavenLocal() + mavenCentral() + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + } + dependencies { + classpath "org.wisepersist:gwt-gradle-plugin:$gwtPluginVersion" + classpath 'com.android.tools.build:gradle:7.4.2' + } } allprojects { - group = 'com.github.mgsx-dev.gdx-gltf' - version = '2.1.0' + group = 'com.github.mgsx-dev.gdx-gltf' + version = '2.1.0' - ext { - gdxVersion = '1.11.0' - junitVersion = '4.13.2' - } + ext { + gdxVersion = '1.11.0' + junitVersion = '4.13.2' + } - repositories { - gradlePluginPortal() - google() - mavenLocal() - mavenCentral() - maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } - maven { url "https://oss.sonatype.org/content/repositories/releases/" } - maven { url "https://jitpack.io" } - } + repositories { + gradlePluginPortal() + google() + mavenLocal() + mavenCentral() + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + maven { url "https://oss.sonatype.org/content/repositories/releases/" } + maven { url "https://jitpack.io" } + } - apply plugin: "eclipse" - apply plugin: "idea" + apply plugin: "eclipse" + apply plugin: "idea" } -eclipse.project.name = "gltf-root" +eclipse.project.name = "gltf-root" \ No newline at end of file diff --git a/demo/android/AndroidManifest.xml b/demo/android/AndroidManifest.xml index 51d3f0fc..41ce3af0 100644 --- a/demo/android/AndroidManifest.xml +++ b/demo/android/AndroidManifest.xml @@ -13,7 +13,6 @@ android:name="net.mgsx.gltf.demo.AndroidLauncher" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:exported="true" - android:label="@string/app_name" android:screenOrientation="landscape"> diff --git a/demo/android/build.gradle b/demo/android/build.gradle index da8c3f87..4802eb04 100644 --- a/demo/android/build.gradle +++ b/demo/android/build.gradle @@ -3,46 +3,48 @@ apply plugin: "com.android.application" configurations { natives } dependencies { - implementation project(":demo:core") - implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" - natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a" - natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a" - natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" - natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64" - + implementation project(":demo:core") + implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" + natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a" + natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a" + natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" + natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64" } android { - compileSdkVersion 33 - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['src'] - aidl.srcDirs = ['src'] - renderscript.srcDirs = ['src'] - res.srcDirs = ['res'] - assets.srcDirs = ['assets'] - jniLibs.srcDirs = ['libs'] - } - - androidTest.setRoot('tests') - } - packagingOptions { - exclude 'META-INF/robovm/ios/robovm.xml' + namespace "net.mgsx.gltf.demo" + compileSdkVersion 33 + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + aidl.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + jniLibs.srcDirs = ['libs'] } - defaultConfig { - applicationId "net.mgsx.gltf.demo" - minSdkVersion 24 - targetSdkVersion 33 - versionCode 4 - versionName "0.0.4" + + androidTest.setRoot('tests') + } + packagingOptions { + resources { + excludes += ['META-INF/robovm/ios/robovm.xml'] } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } + } + defaultConfig { + applicationId "net.mgsx.gltf.demo" + minSdkVersion 24 + targetSdkVersion 33 + versionCode 4 + versionName "0.0.4" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } + } } @@ -50,77 +52,107 @@ android { // the natives configuration, and extracts them to the proper libs/ folders // so they get packed with the APK. task copyAndroidNatives() { - doFirst { - file("libs/armeabi/").mkdirs() - file("libs/armeabi-v7a/").mkdirs() - file("libs/arm64-v8a/").mkdirs() - file("libs/x86_64/").mkdirs() - file("libs/x86/").mkdirs() - - configurations.natives.copy().files.each { jar -> - def outputDir = null - if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a") - if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a") - if (jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi") - if (jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64") - if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86") - if (outputDir != null) { - copy { - from zipTree(jar) - into outputDir - include "*.so" - } - } + doFirst { + file("libs/armeabi-v7a/").mkdirs(); + file("libs/arm64-v8a/").mkdirs(); + file("libs/x86_64/").mkdirs(); + file("libs/x86/").mkdirs(); + + configurations.natives.copy().files.each { jar -> + def outputDir = null + if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a") + if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a") + if (jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64") + if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86") + if (outputDir != null) { + copy { + from zipTree(jar) + into outputDir + include "*.so" } + } } + } } tasks.whenTaskAdded { packageTask -> - if (packageTask.name.contains("package")) { - packageTask.dependsOn "copyAndroidNatives" - } + if (packageTask.name.contains("package")) { + packageTask.dependsOn "copyAndroidNatives" + } } task run(type: Exec) { - def path - def localProperties = project.file("../local.properties") - if (localProperties.exists()) { - Properties properties = new Properties() - localProperties.withInputStream { instr -> - properties.load(instr) - } - def sdkDir = properties.getProperty('sdk.dir') - if (sdkDir) { - path = sdkDir - } else { - path = "$System.env.ANDROID_HOME" - } + def path + def localProperties = project.file("../local.properties") + if (localProperties.exists()) { + Properties properties = new Properties() + localProperties.withInputStream { instr -> + properties.load(instr) + } + def sdkDir = properties.getProperty('sdk.dir') + if (sdkDir) { + path = sdkDir } else { - path = "$System.env.ANDROID_HOME" + path = "$System.env.ANDROID_HOME" } + } else { + path = "$System.env.ANDROID_HOME" + } - def adb = path + "/platform-tools/adb" - commandLine "$adb", 'shell', 'am', 'start', '-n', 'com.mygdx.game/com.mygdx.game.AndroidLauncher' + def adb = path + "/platform-tools/adb" + commandLine "$adb", 'shell', 'am', 'start', '-n', 'com.mygdx.game/com.mygdx.game.AndroidLauncher' +} + +// sets up the Android Eclipse project, using the old Ant based build. +eclipse { + // need to specify Java source sets explicitly, SpringSource Gradle Eclipse plugin + // ignores any nodes added in classpath.file.withXml + sourceSets { + main { + java.srcDirs "src", 'gen' + } + } + + jdt { + sourceCompatibility = 1.6 + targetCompatibility = 1.6 + } + + classpath { + plusConfigurations += [project.configurations.natives] + containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES' + } + + project { + name = appName + "-android" + natures 'com.android.ide.eclipse.adt.AndroidNature' + buildCommands.clear(); + buildCommand "com.android.ide.eclipse.adt.ResourceManagerBuilder" + buildCommand "com.android.ide.eclipse.adt.PreCompilerBuilder" + buildCommand "org.eclipse.jdt.core.javabuilder" + buildCommand "com.android.ide.eclipse.adt.ApkBuilder" + } } // sets up the Android Idea project, using the old Ant based build. idea { - module { - sourceDirs += file("src"); - - iml { - withXml { - def node = it.asNode() - def builder = NodeBuilder.newInstance(); - builder.current = node; - builder.component(name: "FacetManager") { - facet(type: "android", name: "Android") { - configuration { - option(name: "UPDATE_PROPERTY_FILES", value:"true") - } - } - } + module { + sourceDirs += file("src"); + scopes = [COMPILE: [plus: [project.configurations.natives]]] + + iml { + withXml { + def node = it.asNode() + def builder = NodeBuilder.newInstance(); + builder.current = node; + builder.component(name: "FacetManager") { + facet(type: "android", name: "Android") { + configuration { + option(name: "UPDATE_PROPERTY_FILES", value: "true") } + } } + } } + } } diff --git a/demo/android/src/net/mgsx/gltf/demo/AndroidLauncher.java b/demo/android/src/net/mgsx/gltf/demo/AndroidLauncher.java index 85c5dc3d..871b1bd8 100644 --- a/demo/android/src/net/mgsx/gltf/demo/AndroidLauncher.java +++ b/demo/android/src/net/mgsx/gltf/demo/AndroidLauncher.java @@ -6,12 +6,12 @@ import android.os.Bundle; public class AndroidLauncher extends AndroidApplication { - @Override - protected void onCreate (Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GLTFDemo.AUTOLOAD_ENTRY = "BoomBox"; - GLTFDemo.AUTOLOAD_VARIANT = "glTF"; - AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); - initialize(new GLTFDemo("models"), config); - } + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + GLTFDemo.AUTOLOAD_ENTRY = "BoomBox"; + GLTFDemo.AUTOLOAD_VARIANT = "glTF"; + AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); + initialize(new GLTFDemo("models"), config); + } } diff --git a/demo/core/build.gradle b/demo/core/build.gradle index 320645f4..58e68e49 100644 --- a/demo/core/build.gradle +++ b/demo/core/build.gradle @@ -1,18 +1,23 @@ apply plugin: "java" dependencies { - implementation project(":gltf") - implementation "com.badlogicgames.gdx:gdx:$gdxVersion" - testImplementation "junit:junit:$junitVersion" - testImplementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" - testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" + implementation project(":gltf") + implementation "com.badlogicgames.gdx:gdx:$gdxVersion" + + testImplementation "junit:junit:$junitVersion" + testImplementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" + testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' -sourceSets.main.java.srcDirs = [ "src/" ] +sourceSets.main.java.srcDirs = ["src/"] sourceSets.main.resources.srcDirs = ["src"] -sourceSets.test.java.srcDirs = [ "test/" ] - +sourceSets.test.java.srcDirs = ["test/"] eclipse.project.name = appName + "-core" \ No newline at end of file diff --git a/demo/desktop/build.gradle b/demo/desktop/build.gradle index e1ac5865..83394613 100644 --- a/demo/desktop/build.gradle +++ b/demo/desktop/build.gradle @@ -1,55 +1,55 @@ -apply plugin: 'java' +apply plugin: 'application' dependencies { - implementation project(":demo:core") - implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" - implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" - implementation project(path: ':gltf') + implementation project(":demo:core") + implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" + implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" + implementation project(path: ':gltf') } -sourceSets.main.java.srcDirs = [ "src/" ] -sourceSets.test.java.srcDirs = [ "test/" ] +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} + +sourceSets.main.java.srcDirs = ["src/"] +sourceSets.test.java.srcDirs = ["test/"] project.ext.mainClassName = "net.mgsx.gltf.demo.DesktopLauncher" project.ext.assetsDir = new File("../android/assets"); - -task run(dependsOn: classes, type: JavaExec) { - main = project.mainClassName - classpath = sourceSets.main.runtimeClasspath - standardInput = System.in - workingDir = project.assetsDir - ignoreExitValue = true +run { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true } -task debug(dependsOn: classes, type: JavaExec) { - main = project.mainClassName - classpath = sourceSets.main.runtimeClasspath - standardInput = System.in - workingDir = project.assetsDir - ignoreExitValue = true - debug = true +jar { + archiveBaseName.set("$appName-desktop") + duplicatesStrategy(DuplicatesStrategy.EXCLUDE) + dependsOn configurations.runtimeClasspath + from '../android/assets' + exclude 'models' + from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } + exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA') + dependencies { + exclude('META-INF/INDEX.LIST', 'META-INF/maven/**') + } + manifest { + attributes 'Main-Class': project.mainClassName + } + doLast { + file(archiveFile).setExecutable(true, false) + } } -task distDesktop(type: Jar, dependsOn: [classes]) { - from files(sourceSets.main.output.classesDirs) - from files(sourceSets.main.output.resourcesDir) - from {configurations.compile.collect {zipTree(it)}} - from files(project.assetsDir) - - exclude("models") - - // additional files could be added like this : - // from file("$projectDir/LICENSE"); - - manifest { - attributes 'Main-Class': project.mainClassName - } - doLast { - file(archivePath).setExecutable(true, false) - } +task distDesktop(dependsOn: [jar]) { } -java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + +eclipse { + project { + name = appName + "-desktop" + } } \ No newline at end of file diff --git a/demo/html/build.gradle b/demo/html/build.gradle index c305c15c..4d216450 100644 --- a/demo/html/build.gradle +++ b/demo/html/build.gradle @@ -1,40 +1,38 @@ buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath "org.gretty:gretty:3.0.7" - } + repositories { + mavenCentral() + } + dependencies { + classpath "org.gretty:gretty:3.0.7" + } } apply plugin: "gwt" apply plugin: "war" apply plugin: "org.gretty" dependencies { - implementation project(":demo:core") - implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" - implementation "com.badlogicgames.gdx:gdx:$gdxVersion:sources" - implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" - + implementation project(":demo:core") + implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" + implementation "com.badlogicgames.gdx:gdx:$gdxVersion:sources" + implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" } gwt { - gwtVersion="$gwtFrameworkVersion" // Should match the gwt version used for building the gwt backend - maxHeapSize="1G" // Default 256m is not enough for gwt compiler. GWT is HUNGRY - minHeapSize="1G" - - src = files(file("src/")) // Needs to be in front of "modules" below. - modules 'net.mgsx.gltf.demo.GdxDefinition' - devModules 'net.mgsx.gltf.demo.GdxDefinitionSuperdev' - project.webAppDirName = 'webapp' - - compiler { - strict = true; - disableCastChecking = true; - } + gwtVersion = "$gwtFrameworkVersion" // Should match the gwt version used for building the gwt backend + maxHeapSize = "1G" // Default 256m is not enough for gwt compiler. GWT is HUNGRY + minHeapSize = "1G" + + src = files(file("src/")) // Needs to be in front of "modules" below. + modules 'net.mgsx.gltf.demo.GdxDefinition' + devModules 'net.mgsx.gltf.demo.GdxDefinitionSuperdev' + project.webAppDirName = 'webapp' + + compiler { + strict = true; + disableCastChecking = true; + } } - import org.akhikhl.gretty.AppBeforeIntegrationTestTask import org.wisepersist.gradle.plugins.gwt.GwtSuperDev @@ -43,34 +41,34 @@ gretty.resourceBase = project.buildDir.path + "/gwt/draftOut" gretty.contextPath = "/" gretty.portPropertiesFileName = "TEMP_PORTS.properties" -task startHttpServer (dependsOn: [draftCompileGwt]) { - doFirst { - copy { - from "webapp" - into gretty.resourceBase - } - copy { - from "war" - into gretty.resourceBase - } +task startHttpServer(dependsOn: [draftCompileGwt]) { + doFirst { + copy { + from "webapp" + into gretty.resourceBase + } + copy { + from "war" + into gretty.resourceBase } + } } task beforeRun(type: AppBeforeIntegrationTestTask, dependsOn: startHttpServer) { - // The next line allows ports to be reused instead of - // needing a process to be manually terminated. - file("build/TEMP_PORTS.properties").delete() - // Somewhat of a hack; uses Gretty's support for wrapping a task in - // a start and then stop of a Jetty server that serves files while - // also running the SuperDev code server. - integrationTestTask 'superDev' - - interactive false + // The next line allows ports to be reused instead of + // needing a process to be manually terminated. + file("build/TEMP_PORTS.properties").delete() + // Somewhat of a hack; uses Gretty's support for wrapping a task in + // a start and then stop of a Jetty server that serves files while + // also running the SuperDev code server. + integrationTestTask 'superDev' + + interactive false } task superDev(type: GwtSuperDev) { - doFirst { - gwt.modules = gwt.devModules - } + doFirst { + gwt.modules = gwt.devModules + } } // This next line can be changed if you want to, for instance, always build into the // docs/ folder of a Git repo, which can be set to automatically publish on GitHub Pages. @@ -78,54 +76,58 @@ task superDev(type: GwtSuperDev) { var outputPath = "build/dist/" task distWeb(dependsOn: [clean, compileGwt]) { - doLast { - file(outputPath).mkdirs() - copy { - from("build/gwt/out"){ - exclude '**/*.symbolMap' // Not used by a dist, and these can be large. - exclude 'WEB-INF', 'html/clear.cache.gif', 'html/html.devmode.js' - } - into outputPath - } - copy { - from("webapp") { - exclude 'WEB-INF' - } - into outputPath - } - copy { - from "war" - into outputPath - exclude 'WEB-INF' - } + doLast { + file(outputPath).mkdirs() + copy { + from("build/gwt/out") { + exclude '**/*.symbolMap' // Not used by a dist, and these can be large. + exclude 'WEB-INF', 'html/clear.cache.gif', 'html/html.devmode.js' + } + into outputPath } + copy { + from("webapp") { + exclude 'WEB-INF' + } + into outputPath + } + copy { + from "war" + into outputPath + exclude 'WEB-INF' + } + } } task validateDistWeb(type: Exec /*, dependsOn: distWeb*/) { - commandLine 'ruby', '-e', "require 'sinatra' ; set public_folder: '$buildDir/dist' ; set bind: '0.0.0.0'" + commandLine 'ruby', '-e', "require 'sinatra' ; set public_folder: '$buildDir/dist' ; set bind: '0.0.0.0'" } -task distWebZip(type: Zip, dependsOn: distWeb){ - from(outputPath) - archiveBaseName.set("dist-${version}.zip") - destinationDir(file("build")) +task distWebZip(type: Zip, dependsOn: distWeb) { + from(outputPath) + archiveBaseName.set("dist-${version}.zip") + destinationDir(file("build")) } task addSource { - doLast { - sourceSets.main.compileClasspath += files(project(':gltf').sourceSets.main.allJava.srcDirs) - sourceSets.main.compileClasspath += files(project(':demo:core').sourceSets.main.allJava.srcDirs) - } + doLast { + sourceSets.main.compileClasspath += files(project(':gltf').sourceSets.main.allJava.srcDirs) + sourceSets.main.compileClasspath += files(project(':demo:core').sourceSets.main.allJava.srcDirs) + } } tasks.compileGwt.dependsOn(addSource) tasks.draftCompileGwt.dependsOn(addSource) tasks.checkGwt.dependsOn(addSource) -sourceCompatibility = 1.7 -sourceSets.main.java.srcDirs = [ "src/" ] +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +sourceSets.main.java.srcDirs = ["src/"] eclipse.project { - name = appName + "-html" + name = appName + "-html" } diff --git a/gltf/build.gradle b/gltf/build.gradle index 75c28e58..f22ffd17 100644 --- a/gltf/build.gradle +++ b/gltf/build.gradle @@ -3,34 +3,36 @@ eclipse.project.name = "gdx-gltf" apply plugin: "java" dependencies { - implementation "com.badlogicgames.gdx:gdx:$gdxVersion" - testImplementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" - testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" - testImplementation "junit:junit:$junitVersion" + implementation "com.badlogicgames.gdx:gdx:$gdxVersion" + + testImplementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" + testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" + testImplementation "junit:junit:$junitVersion" } -sourceSets.main.java.srcDirs = [ "src" ] +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +sourceSets.main.java.srcDirs = ["src"] sourceSets.main.resources.srcDirs = ["src"] -sourceSets.test.java.srcDirs = [ "test" ] +sourceSets.test.java.srcDirs = ["test"] sourceSets.test.resources.srcDirs = ["testRes"] -[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' - task sourcesJar(type: Jar) { - duplicatesStrategy = 'exclude' - from sourceSets.main.allSource + duplicatesStrategy = 'exclude' + classifier = 'sources' + from sourceSets.main.allSource } javadoc { - failOnError = false + failOnError = false } -java { - withSourcesJar() - withJavadocJar() -} +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + withSourcesJar() + withJavadocJar() } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 85fd61dc..c834fbe5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Apr 03 00:42:37 EDT 2023 +#Wed Apr 26 09:30:35 EDT 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/ibl-composer/build.gradle b/ibl-composer/build.gradle index cd1aaeb2..dc0dbeee 100644 --- a/ibl-composer/build.gradle +++ b/ibl-composer/build.gradle @@ -1,62 +1,67 @@ -apply plugin: 'java' +apply plugin: 'application' ext { - appName = "gdx-gltf-ibl-composer" + appName = "gdx-gltf-ibl-composer" } eclipse.project.name = appName - dependencies { - implementation project(":gltf") - implementation "com.badlogicgames.gdx:gdx:$gdxVersion" - implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" - implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" - + implementation project(":gltf") + implementation "com.badlogicgames.gdx:gdx:$gdxVersion" + implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" + implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } -sourceSets.main.java.srcDirs = [ "src/" ] +sourceSets.main.java.srcDirs = ["src/"] sourceSets.main.resources.srcDirs = ["src"] -sourceSets.test.java.srcDirs = [ "test/" ] +sourceSets.test.java.srcDirs = ["test/"] project.ext.mainClassName = "net.mgsx.gltf.ibl.IBLComposerLauncher" project.ext.assetsDir = new File("assets"); - -task run(dependsOn: classes, type: JavaExec) { - main = project.mainClassName - classpath = sourceSets.main.runtimeClasspath - standardInput = System.in - workingDir = project.assetsDir - ignoreExitValue = true +run { + workingDir = 'assets' + setIgnoreExitValue(true) } -task debug(dependsOn: classes, type: JavaExec) { - main = project.mainClassName - classpath = sourceSets.main.runtimeClasspath - standardInput = System.in - workingDir = project.assetsDir - ignoreExitValue = true - debug = true +jar { + archiveBaseName.set('IBL-Composer') + duplicatesStrategy(DuplicatesStrategy.EXCLUDE) + dependsOn configurations.runtimeClasspath + from 'assets' + from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } + exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA') + dependencies { + exclude('META-INF/INDEX.LIST', 'META-INF/maven/**') + } + manifest { + attributes 'Main-Class': project.mainClassName + } + doLast { + file(archiveFile).setExecutable(true, false) + } } -task distIBL(type: Jar, dependsOn: [classes]) { - from files(sourceSets.main.output.classesDirs) - from files(sourceSets.main.output.resourcesDir) - from {configurations.compile.collect {zipTree(it)}} - from files(project.assetsDir) +task distIBL(dependsOn: [jar]) { +} - // additional files could be added like this : - // from file("$projectDir/LICENSE"); +task sourcesJar(type: Jar) { + duplicatesStrategy = 'exclude' + classifier = 'sources' + from sourceSets.main.allSource +} - manifest { - attributes 'Main-Class': project.mainClassName - } - doLast { - file(archivePath).setExecutable(true, false) - } +javadoc { + failOnError = false } + java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + withSourcesJar() + withJavadocJar() } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 3ea0f910..46ac2f79 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,6 +4,6 @@ include ":demo" include ":demo:core" include ":demo:desktop" include ":demo:android" -//include ":demo:html" +include ":demo:html" include ":ibl-composer" \ No newline at end of file