/* * Copyright (C) 2016 CZ.NIC, z.s.p.o. (http://www.nic.cz/) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import com.badlogic.gdx.graphics.Texture import com.badlogic.gdx.tools.texturepacker.TexturePacker buildscript { repositories { maven { url "http://repo1.maven.org/maven2" } maven { url "https://jitpack.io" } maven { url "https://plugins.gradle.org/m2/" } jcenter { url "http://jcenter.bintray.com/" } } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1' classpath 'com.github.JakeWharton:sdk-manager-plugin:220bf7a88a7072df3ed16dc8466fb144f2817070' classpath 'com.novoda:gradle-android-command-plugin:1.3.0' classpath 'com.badlogicgames.gdx:gdx-tools:1.6.1' classpath 'edu.sc.seis.gradle:launch4j:2.3.0' classpath "gradle.plugin.edu.sc.seis:macAppBundle:2.1.9" } } final assetsDirName = "assets" final assetsSourceDirName = "src" final assetsDestinationDirName = "dest" final assetsHdDirName = "hd" final assetsGameDirectory = "game" final assetsGameGlobalDirectory = "_global" final assetsGameCommonDifficultyDirectory = "common" final assetsGameExcludedDirectory = "excluded" final String TABLEXIA_GIT_PATH = './' final String MODEL_GIT_PATH = 'core/external/' System.setProperty("javax.net.ssl.trustStore", new File("${project(":android").projectDir.absolutePath}/assets/keystore/tablexiaTrustKeystore").getAbsolutePath()); System.setProperty("javax.net.ssl.trustStorePassword", "tablexia"); ext { assetsChecksumPattern = "\"=======ASSETS_CHECKSUM=======\"" assetsChecksum = [:] assetsHdChecksum = [:] assetsPackDir = new File("${rootProject.buildDir}/${assetsDirName}/pack/") assetsHdPackDir = new File("${rootProject.buildDir}/${assetsDirName}/${assetsHdDirName}/pack/") } allprojects { apply plugin: "eclipse" apply plugin: "idea" ext { appName = 'Tablexia' masterBranch = 'master' applicationBaseId = 'cz.nic.tablexia' tablexiaAppName = getTablexiaAppName() assetsDebugURLPart = isReleaseBuild() ? '' : 'debug/' assetsDownloadUrl = project.hasProperty("TABLEXIA_ASSETS_DOWNLOAD_URL") ? ("${TABLEXIA_ASSETS_DOWNLOAD_URL}/${assetsDebugURLPart}") : "/" assetsUploadURL = (project.hasProperty("TABLEXIA_ASSETS_UPLOAD_USER") && project.hasProperty("TABLEXIA_ASSETS_UPLOAD_URL")) ? "${TABLEXIA_ASSETS_UPLOAD_USER}@${TABLEXIA_ASSETS_UPLOAD_URL}/${assetsDebugURLPart}" : "/" serverFallbackHost = "" serverHost = isReleaseBuild() ? getPropertyValueOrFallbackValue("TABLEXIA_SERVER_HOST_PRODUCTION", serverFallbackHost) : getPropertyValueOrFallbackValue("TABLEXIA_SERVER_HOST_DEBUG", serverFallbackHost) serverSecretFallback = "" serverSecret = isReleaseBuild() ? getPropertyValueOrFallbackValue("TABLEXIA_SERVER_SECRET_PRODUCTION", serverSecretFallback) : getPropertyValueOrFallbackValue("TABLEXIA_SERVER_SECRET_DEBUG", serverSecretFallback); tablexiaVersionName = getVersionNameFromGit(TABLEXIA_GIT_PATH) tablexiaVersionCode = getVersionCodeFromGit(TABLEXIA_GIT_PATH) tablexiaModelVersionName = getVersionNameFromGit(MODEL_GIT_PATH) tablexiaModelVersionCode = getVersionCodeFromGit(MODEL_GIT_PATH) applicationIdBranch = getTablexiaAppId() applicationIdRelease = applicationBaseId + applicationIdBranch applicationIdDebugSuffix = '.debug' applicationIdDebug = applicationIdRelease + applicationIdDebugSuffix applicationIdITestSuffix = '.itest' applicationIdITest = applicationIdRelease + applicationIdITestSuffix applicationIdDevelSuffix = '.devel' applicationIdDevel = applicationBaseId + applicationIdDevelSuffix //Fallback value if sentry DSN is not defined (gradle parameter SENTRY_DSN_DEBUG or SENTRY_DSN_RELEASE) sentryDSNFallbackValue = "None" sentryDSN = isReleaseBuild() ? getPropertyValueOrFallbackValue("TABLEXIA_SENTRY_DSN_RELEASE", sentryDSNFallbackValue) : getPropertyValueOrFallbackValue("TABLEXIA_SENTRY_DSN_DEBUG", sentryDSNFallbackValue) gdxVersion = '1.9.8' gdxUtilsVersion = '0.13.2' mbassadorVersion = '1.2.0' roboVMVersion = '2.3.1' sqlDroidVersion = '1.0.3' sqlLiteJdbcVersion = '3.8.10.1' guavaVersion = '18.0' roboPodsVersion = '1.13.0' androidSupportV4Version = '22.0.0' googlePlayServicesVersion = '8.3.+' zxingVersion = '3.2.1' servletApiVersion = '5.5.23' ravenVersion = '7.5.0' } version = getVersionNameFromGit(TABLEXIA_GIT_PATH) repositories { maven { url "http://repo1.maven.org/maven2" } jcenter { url "http://jcenter.bintray.com/" } maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven { url "https://oss.sonatype.org/content/repositories/releases/" } } } task clean << { delete "${buildDir}" } task prepareAssets { def sourceDir = new File(project(":core").projectDir.absolutePath + "/${assetsDirName}") inputs.dir(sourceDir.absolutePath) outputs.dir("${buildDir}/${assetsDirName}/${assetsSourceDirName}/") doLast { sourceDir.eachDir() { dir -> if (!dir.name.equals('common')) { String dirName = dir.getName() String destDir = "${buildDir}/${assetsDirName}/${assetsSourceDirName}/${dirName}" task("${name}_${dirName}", type: Copy) { from sourceDir.absolutePath + "/common" from dir.absolutePath into destDir }.execute() } } } } task prepareSoundAssets(dependsOn: prepareAssets) { def assetsDir = new File("${buildDir}/${assetsDirName}/") inputs.dir("${assetsDir.absolutePath}/${assetsSourceDirName}/") outputs.dir("${assetsDir.absolutePath}/${assetsDestinationDirName}/") doLast { new File("${assetsDir}/${assetsSourceDirName}/").eachDir() { langDir -> langDir.eachDir() { sectionDir -> sectionDir.eachDir() { atlasDir -> task("${name}_" + sectionDir.name + "_" + atlasDir.name + "_" + langDir.name, type: Copy) { from atlasDir into "${buildDir}/${assetsDirName}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/" include '**/*.mp3' includeEmptyDirs false eachFile { FileCopyDetails fcd -> fcd.setPath(fcd.getRelativePath().toString().replace('/', '.')) } outputs.upToDateWhen { false } }.execute() } } } } } task prepareJsonAssets(dependsOn: prepareAssets) { def assetsDir = new File("${buildDir}/${assetsDirName}/") inputs.dir("${assetsDir.absolutePath}/${assetsSourceDirName}/") outputs.dir("${assetsDir.absolutePath}/${assetsDestinationDirName}/") doLast { new File("${assetsDir}/${assetsSourceDirName}/").eachDir() { langDir -> langDir.eachDir() { sectionDir -> sectionDir.eachDir() { atlasDir -> task("${name}_" + sectionDir.name + "_" + atlasDir.name + "_" + langDir.name, type: Copy) { from atlasDir into "${buildDir}/${assetsDirName}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/" include '**/*.json' includeEmptyDirs false eachFile { FileCopyDetails fcd -> fcd.setPath(fcd.getRelativePath().toString().replace('/', '.')) } outputs.upToDateWhen { false } }.execute() } } } } } task prepareHdAssets(dependsOn: prepareAssets) { def sourceDir = new File("${buildDir}/${assetsDirName}/src/") def assetsDir = new File("${buildDir}/${assetsDirName}/") def hdSourceDir = new File(project(":desktop").projectDir.absolutePath + "/${assetsDirName}/${assetsHdDirName}") inputs.dir(hdSourceDir.absolutePath) inputs.dir(sourceDir.absolutePath) outputs.dir("${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsSourceDirName}/") doLast { if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) { new File("${assetsDir}/${assetsSourceDirName}/").eachDir() { langDir -> langDir.eachDir() { sectionDir -> sectionDir.eachDir() { atlasDir -> task("${name}_sounds_" + sectionDir.name + "_" + atlasDir.name + "_" + langDir.name, type: Copy) { from atlasDir into "${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/" include '**/*.mp3', '**/*.json' includeEmptyDirs false eachFile { FileCopyDetails fcd -> fcd.setPath(fcd.getRelativePath().toString().replace('/', '.')) } outputs.upToDateWhen { false } }.execute() } } } sourceDir.eachDir() { dir -> if (!dir.name.equals('common')) { String dirName = dir.getName() String destDir = "${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsSourceDirName}/${dirName}" task("${name}_${dirName}", type: Copy) { from dir.absolutePath from hdSourceDir.absolutePath + "/common" from hdSourceDir.absolutePath + "/" + dirName into destDir }.execute() } } } else { println "HD PACK IS NOT REQUESTED" } } } task prepareGraphicAssets(dependsOn: prepareAssets) { def assetsDir = new File("${buildDir}/${assetsDirName}/") inputs.dir("${assetsDir.absolutePath}/${assetsSourceDirName}/") outputs.dir("${assetsDir.absolutePath}/${assetsDestinationDirName}/") doLast { TexturePacker.Settings settings = new TexturePacker.Settings(); settings.pot = false; settings.maxWidth = 1024; settings.maxHeight = 1024; settings.combineSubdirectories = true; settings.filterMin = Texture.TextureFilter.Linear; settings.filterMag = Texture.TextureFilter.Linear; new File("${assetsDir.absolutePath}/${assetsSourceDirName}/").eachDir() { langDir -> langDir.eachDir() { sectionDir -> //If section dir has no dirs, copy whole content if (hasAtlasDir(sectionDir)) { sectionDir.eachDir() { atlasDir -> if (assetsGameDirectory.equals(sectionDir.name) && !assetsGameGlobalDirectory.equals(atlasDir.name)) { atlasDir.eachDir() { difficultyDir -> if (!assetsGameExcludedDirectory.equals(difficultyDir.name)) { String packFileName = assetsGameCommonDifficultyDirectory.equals(difficultyDir.name) ? atlasDir.name : difficultyDir.name; TexturePacker.process(settings, "${difficultyDir}", "${assetsDir.absolutePath}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/", "${packFileName}") } else { task("${name}_" + sectionDir.name + "_" + langDir.name + "_" + atlasDir.name + "_" + difficultyDir.name, type: Copy) { from difficultyDir into "${buildDir}/${assetsDirName}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/${difficultyDir.name}" include '**/*' includeEmptyDirs false outputs.upToDateWhen { false } }.execute() } } } else { TexturePacker.process(settings, "${atlasDir}", "${assetsDir.absolutePath}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/", "${atlasDir.name}") } } } else { task("${name}_" + sectionDir.name + "_" + langDir.name, type: Copy) { from sectionDir into "${buildDir}/${assetsDirName}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}" include '**/*' includeEmptyDirs false outputs.upToDateWhen { false } }.execute() } } } //optimizing for uploading if (project.hasProperty('TABLEXIA_ASSETS_OPTIMIZE') && Boolean.valueOf(TABLEXIA_ASSETS_OPTIMIZE).booleanValue()) { println "ASSETS OPTIMIZATION: ENABLED." println "ASSETS OPTIMIZATION: START." new File("${assetsDir.absolutePath}/${assetsDestinationDirName}/").eachDir() { dir -> dir.eachFileRecurse() { file -> if (file.name.endsWith(".png") && !file.absolutePath.contains("excluded")) { println "Optimizing: ${file.name}" exec { commandLine 'pngquant', '--ext', '.png', '--nofs', '-f', 256, file.absolutePath } } } } println "ASSETS OPTIMIZATION: FINISH." } else { println "ASSETS OPTIMIZATION NOT CONFIGURED -> SKIPPING OPTIMIZATION" } } } def hasAtlasDir(File file) { for(File f : file.listFiles()) { if(f.isDirectory()) return true; } return false; } task zipAssets(dependsOn: [prepareSoundAssets, prepareGraphicAssets, prepareJsonAssets]) { doLast { new File(project(":core").projectDir.absolutePath + "/${assetsDirName}").eachDir() { dir -> if (!dir.name.equals('common')) { task("${name}_${dir.name}", type: Zip) { archiveName = dir.getName() + "_SNAPSHOT.zip" destinationDir = rootProject.ext.assetsPackDir from "${buildDir}/${assetsDirName}/${assetsDestinationDirName}/${dir.name}" }.execute() } } } } task prepareHdGraphicAssets(dependsOn: prepareHdAssets) { def assetsDir = new File("${buildDir}/${assetsDirName}/${assetsHdDirName}/") inputs.dir("${assetsDir.absolutePath}/${assetsSourceDirName}/") outputs.dir("${assetsDir.absolutePath}/${assetsDestinationDirName}/") doLast { if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) { TexturePacker.Settings settings = new TexturePacker.Settings(); settings.pot = false; settings.maxWidth = 2048; settings.maxHeight = 2048; settings.combineSubdirectories = true; settings.filterMin = Texture.TextureFilter.Linear; settings.filterMag = Texture.TextureFilter.Linear; new File("${assetsDir.absolutePath}/${assetsSourceDirName}/").eachDir() { langDir -> langDir.eachDir() { sectionDir -> //If section dir has no dirs, copy whole content if (hasAtlasDir(sectionDir)) { sectionDir.eachDir() { atlasDir -> if (assetsGameDirectory.equals(sectionDir.name) && !assetsGameGlobalDirectory.equals(atlasDir.name)) { atlasDir.eachDir() { difficultyDir -> if (!assetsGameExcludedDirectory.equals(difficultyDir.name)) { String packFileName = assetsGameCommonDifficultyDirectory.equals(difficultyDir.name) ? atlasDir.name : difficultyDir.name; TexturePacker.process(settings, "${difficultyDir}", "${assetsDir.absolutePath}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/", "${packFileName}") } else { task("${name}_" + sectionDir.name + "_" + langDir.name + "_" + atlasDir.name + "_" + difficultyDir.name, type: Copy) { from difficultyDir into "${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/${difficultyDir.name}" include '**/*' includeEmptyDirs false outputs.upToDateWhen { false } }.execute() } } } else { TexturePacker.process(settings, "${atlasDir}", "${assetsDir.absolutePath}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}/${atlasDir.name}/", "${atlasDir.name}") } } } else { task("${name}_" + sectionDir.name + "_" + langDir.name, type: Copy) { from sectionDir into "${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsDestinationDirName}/${langDir.name}/${sectionDir.name}" include '**/*' includeEmptyDirs false outputs.upToDateWhen { false } }.execute() } } } //optimizing for uploading if (project.hasProperty('TABLEXIA_ASSETS_OPTIMIZE') && Boolean.valueOf(TABLEXIA_ASSETS_OPTIMIZE).booleanValue()) { println "HD ASSETS OPTIMIZATION: ENABLED." println "HD ASSETS OPTIMIZATION: START." new File("${assetsDir.absolutePath}/${assetsDestinationDirName}/").eachDir() { dir -> dir.eachFileRecurse() { file -> if (file.name.endsWith(".png") && !file.absolutePath.contains("excluded")) { println "Optimizing: ${file.name}" exec { commandLine 'pngquant', '--ext', '.png', '--nofs', '-f', 256, file.absolutePath } } } } println "HD ASSETS OPTIMIZATION: FINISH." } else { println "ASSETS OPTIMIZATION NOT CONFIGURED -> SKIPPING OPTIMIZATION" } } else { println "HD PACK IS NOT REQUESTED" } } } task zipHdAssets(dependsOn: prepareHdGraphicAssets) { doLast { if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) { new File(project(":core").projectDir.absolutePath + "/${assetsDirName}/").eachDir() { dir -> if (!dir.name.equals('common')) { task("${name}_${dir.name}", type: Zip) { archiveName = dir.getName() + "_SNAPSHOT_HD.zip" destinationDir = rootProject.ext.assetsHdPackDir from "${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsDestinationDirName}/${dir.name}" }.execute() } } } else { println "HD PACK IS NOT REQUESTED" } } } task processAssets(dependsOn: [':util:checksum:runChecksum', ':util:checksum:runAssetsArchivesChecksum']) { doLast { if (project.hasProperty('TABLEXIA_ASSETS_UPLOAD_USER') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD_URL') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD') && Boolean.valueOf(project.property('TABLEXIA_ASSETS_UPLOAD')).booleanValue()) { def data = new URL(project.assetsDownloadUrl).getText() rootProject.ext.assetsPackDir.eachFile() { file -> String fileName = file.getName() String[] fileNameParts = fileName.split("_SNAPSHOT\\."); String packageName = "${fileNameParts[0]}_${assetsChecksum[fileNameParts[0]]}.${fileNameParts[1]}"; if (!data.contains(packageName)) { String assetsUploadPath = "${project.assetsUploadURL}${packageName}" println "AssetsUploader: UPLOADING FILE: ${project.assetsDebugURLPart}${packageName}" task ("${name}_${packageName}", type:Exec) { workingDir "${rootProject.projectDir}" commandLine 'scp', file.getAbsolutePath(), assetsUploadPath standardOutput = new ByteArrayOutputStream() ext.output = { return standardOutput.toString() } }.execute() } else { println "AssetsUploader: FILE: ${project.assetsDebugURLPart}${packageName} EXISTS ON SERVER -> SKIPPING UPLOAD" } } } else { println "ASSETS UPLOAD NOT CONFIGURED -> SKIPPING UPLOAD" } } } task prepareHdPack(dependsOn: [':util:checksum:runHdChecksum', ':util:checksum:runHdAssetsArchivesChecksum']) { doLast { //prepare and upload hd packs if (project.hasProperty('TABLEXIA_HD_ASSETS') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD_USER') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD_URL') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD') && Boolean.valueOf(project.property('TABLEXIA_ASSETS_UPLOAD')).booleanValue() && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) { def data = new URL(project.assetsDownloadUrl).getText() rootProject.ext.assetsHdPackDir.eachFile() { file -> String fileName = file.getName() String[] fileNameParts = fileName.split("_SNAPSHOT"); String packageName = "${fileNameParts[0]}_${assetsHdChecksum[fileNameParts[0]]}${fileNameParts[1]}"; if (!data.contains(packageName)) { String assetsUploadPath = "${project.assetsUploadURL}${packageName}" println "AssetsUploader: UPLOADING FILE: ${project.assetsDebugURLPart}${packageName}" task("${name}_${packageName}", type: Exec) { workingDir "${rootProject.projectDir}" commandLine 'scp', file.getAbsolutePath(), assetsUploadPath standardOutput = new ByteArrayOutputStream() ext.output = { return standardOutput.toString() } }.execute() } else { println "AssetsUploader: FILE: ${project.assetsDebugURLPart}${packageName} EXISTS ON SERVER -> SKIPPING UPLOAD" } } } else { println "ASSETS UPLOAD NOT CONFIGURED -> SKIPPING UPLOAD" } } } task unlockIOSKeyChain() << { if (project.hasProperty('TABLEXIA_KEYCHAIN_USER') && project.hasProperty('TABLEXIA_KEYCHAIN_PATH')) { exec { commandLine 'security', 'unlock-keychain', '-p', TABLEXIA_KEYCHAIN_USER, TABLEXIA_KEYCHAIN_PATH } } else { println "CANNOT UNLOCK KEYCHAIN -> TABLEXIA_KEYCHAIN_USER OR TABLEXIA_KEYCHAIN_PATH BUILD VARIABLE IS NOT SET!" } } def getPropertyValueOrFallbackValue(String key, String fallbackValue) { return project.hasProperty(key) ? project.getProperties().get(key) : fallbackValue } def getTablexiaAppName() { if (isReleaseBuild()) { return "${project.appName}" } else { return "${project.appName} (${getBranchNameFromGit()})" } } def getTablexiaAppId() { if (isReleaseBuild()) { return "" } else { return ".${getBranchNameFromGit().trim().replaceAll('-', '').replaceAll('\\.', '').replaceAll('\\d', '').toLowerCase()}" } } def getVersionNameFromGit(String relativePath) { def stdout = new ByteArrayOutputStream() // get last tag in current branch exec { workingDir relativePath commandLine 'git', 'describe', '--abbrev=0', '--tags', '--always' standardOutput = stdout } String result = stdout.toString().trim(); // for non release branches add number of commits and branch name if (!isReleaseBuild()) { stdout = new ByteArrayOutputStream() exec { workingDir relativePath commandLine 'git', 'rev-list', "${result}..HEAD", '--count' standardOutput = stdout } String numberOfCommits = stdout.toString().trim() if (!"0".equals(numberOfCommits)) { // add branch name and number of commits result = "${result}-${numberOfCommits}" } } return result } def getVersionCodeFromGit(String relativePath) { def stdout = new ByteArrayOutputStream() exec { workingDir relativePath commandLine 'git', 'log', '-1', '--format=%at' standardOutput = stdout } return stdout.toString().trim().toInteger() } def getBranchNameFromGit() { def stdout = new ByteArrayOutputStream() exec { commandLine 'git', 'describe', '--contains', '--all', 'HEAD', '--always' standardOutput = stdout } String branchString = stdout.toString().trim() return branchString.contains("/") ? branchString.substring(branchString.lastIndexOf("/") + 1) : branchString } boolean isReleaseBuild() { return project.hasProperty('TABLEXIA_RELEASE_BUILD') && Boolean.valueOf(project.property('TABLEXIA_RELEASE_BUILD')).booleanValue() } def getMapConvertedToString(Map map) { String result = ""; map.each { key, value -> if (result.size() > 0) result = result + "," result = result + "$key:$value" } return result; } project(":desktop") { apply plugin: "java" tasks.processResources.dependsOn prepareHdPack dependencies { compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion" compile "net.engio:mbassador:$mbassadorVersion" compile "com.jcabi:jcabi-manifests:1.1" compile "org.xerial:sqlite-jdbc:$sqlLiteJdbcVersion" } } project(":android") { apply plugin: 'android-sdk-manager' apply plugin: 'com.android.application' apply plugin: 'android-command' configurations { natives } dependencies { compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" compile "net.engio:mbassador:$mbassadorVersion" compile "org.sqldroid:sqldroid:$sqlDroidVersion" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" } } project(":ios") { apply plugin: "java" apply plugin: "robovm" configurations { natives } dependencies { compile project(":core") compile "com.mobidevelop.robovm:robovm-rt:${roboVMVersion}" compile "com.mobidevelop.robovm:robovm-cocoatouch:${roboVMVersion}" compile "net.engio:mbassador:$mbassadorVersion" compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" } } project(":core") { apply plugin: "java" sourceSets.test.java.srcDirs = ["test/"] tasks.processResources.dependsOn processAssets dependencies { compile project(":util:checksum") compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "net.dermetfan.libgdx-utils:libgdx-utils:$gdxUtilsVersion" compile "net.engio:mbassador:$mbassadorVersion" compile "com.google.guava:guava:$guavaVersion" compile "com.google.zxing:core:$zxingVersion" compile "tomcat:servlet-api:$servletApiVersion" compile "com.getsentry.raven:raven:$ravenVersion" testCompile "junit:junit:4.11" testCompile "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion" testCompile "com.badlogicgames.gdx:gdx:$gdxVersion" testCompile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" } } project(":itest") { apply plugin: "java" dependencies { compile project(':core') } } tasks.eclipse.doLast { delete ".project" }