├── .gitmodules ├── server ├── test-data │ ├── podfiles │ │ ├── empty.Podfile │ │ ├── wrong.Podfile │ │ ├── with_comments.Podfile │ │ └── regular.Podfile │ ├── testproject │ │ ├── b │ │ │ ├── ext.manifest │ │ │ ├── include │ │ │ │ └── b.h │ │ │ ├── src │ │ │ │ └── b.cpp │ │ │ └── lib │ │ │ │ ├── ios │ │ │ │ └── ios.a │ │ │ │ ├── osx │ │ │ │ └── osx.a │ │ │ │ └── arm64-osx │ │ │ │ └── x86-osx.a │ │ └── a │ │ │ └── notincluded.h │ ├── query1 │ │ ├── a.txt │ │ ├── b.txt │ │ └── ne-cache-info.json │ ├── jars │ │ ├── META-INF │ │ │ └── inner.folder │ │ │ │ ├── com.inner │ │ │ │ ├── inner.pom.xml │ │ │ │ ├── inner.pom.properties │ │ │ │ └── io.foo.service.HTTPClient │ │ ├── com │ │ │ └── defold │ │ │ │ └── dummy │ │ │ │ └── Dummy.java │ │ ├── io │ │ │ └── foo │ │ │ │ └── dummy │ │ │ │ └── FooDummy.java │ │ └── build.sh │ ├── ext │ │ ├── lib │ │ │ ├── x86_64-win32 │ │ │ │ ├── empty.lib │ │ │ │ │ └── .gitkeep │ │ │ │ └── alib.lib │ │ │ ├── js-web │ │ │ │ ├── libalib.a │ │ │ │ └── library_dummy.js │ │ │ ├── android │ │ │ │ ├── Dummy.jar │ │ │ │ ├── JarDep.jar │ │ │ │ ├── meta-inf.jar │ │ │ │ ├── VeryLarge1.jar │ │ │ │ └── VeryLarge2.jar │ │ │ ├── wasm-web │ │ │ │ └── libalib.a │ │ │ ├── x86-win32 │ │ │ │ └── alib.lib │ │ │ ├── arm64-ios │ │ │ │ └── libalib.a │ │ │ ├── arm64-osx │ │ │ │ └── libalib.a │ │ │ ├── armv7-ios │ │ │ │ └── libalib.a │ │ │ ├── x86_64-osx │ │ │ │ ├── blib.framework │ │ │ │ │ └── README.txt │ │ │ │ └── libalib.a │ │ │ ├── arm64-android │ │ │ │ └── libalib.a │ │ │ ├── armv7-android │ │ │ │ └── libalib.a │ │ │ └── x86_64-linux │ │ │ │ └── libalib.a │ │ ├── include │ │ │ └── ext.h │ │ ├── src │ │ │ ├── Test.java │ │ │ ├── TestJar.java │ │ │ └── test_ext.cpp │ │ └── ext.manifest │ ├── ext_basic │ │ ├── ext.manifest │ │ ├── include │ │ │ └── ext.h │ │ └── src │ │ │ └── test_ext.cpp │ ├── ext_dyn_libs │ │ ├── ext.manifest │ │ ├── lib │ │ │ ├── x86-win32 │ │ │ │ └── dynamic_specific1.dll │ │ │ ├── x86_64-win32 │ │ │ │ └── dynamic_specific1.dll │ │ │ ├── arm64-ios │ │ │ │ └── libdynamic_specific1.so │ │ │ ├── arm64-android │ │ │ │ └── libdynamic_specific1.so │ │ │ ├── arm64-osx │ │ │ │ └── libdynamic_specific1.dylib │ │ │ ├── armv7-android │ │ │ │ └── libdynamic_specific1.so │ │ │ ├── x86_64-linux │ │ │ │ └── libdynamic_specific1.so │ │ │ ├── x86_64-osx │ │ │ │ └── libdynamic_specific1.dylib │ │ │ ├── js-web │ │ │ │ └── libdynamic_specific1.so │ │ │ └── wasm-web │ │ │ │ └── libdynamic_specific1.so │ │ └── src │ │ │ └── test_ext.cpp │ ├── invalidfilenames │ │ ├── ext.manifest │ │ ├── include │ │ │ └── foo;echo hello;.h │ │ └── src │ │ │ └── test.cpp │ ├── ext_std │ │ ├── ext.manifest │ │ ├── lib │ │ │ ├── js-web │ │ │ │ └── libstd.a │ │ │ ├── wasm-web │ │ │ │ └── libstd.a │ │ │ ├── x86-win32 │ │ │ │ └── std.lib │ │ │ ├── arm64-ios │ │ │ │ └── libstd.a │ │ │ ├── arm64-osx │ │ │ │ └── libstd.a │ │ │ ├── armv7-ios │ │ │ │ └── libstd.a │ │ │ ├── x86_64-osx │ │ │ │ └── libstd.a │ │ │ ├── arm64-android │ │ │ │ └── libstd.a │ │ │ ├── armv7-android │ │ │ │ └── libstd.a │ │ │ ├── x86_64-linux │ │ │ │ └── libstd.a │ │ │ └── x86_64-win32 │ │ │ │ └── std.lib │ │ ├── include │ │ │ └── std.h │ │ └── src │ │ │ └── test_ext.cpp │ ├── sdk │ │ └── a │ │ │ └── defoldsdk │ │ │ ├── extender │ │ │ └── variants │ │ │ │ └── debug.appmanifest │ │ │ ├── share │ │ │ └── java │ │ │ │ ├── Engine.jar │ │ │ │ ├── build.sh │ │ │ │ └── com │ │ │ │ └── defoldtest │ │ │ │ └── engine │ │ │ │ └── Engine.java │ │ │ └── lib │ │ │ ├── linux │ │ │ ├── libengine_foo.a │ │ │ ├── libengine_main.a │ │ │ └── x86-linux │ │ │ │ ├── libengine_foo.a │ │ │ │ └── libengine_main.a │ │ │ ├── x86-win32 │ │ │ ├── defold.ico │ │ │ ├── engine.rc │ │ │ ├── OpenAL32.lib │ │ │ ├── engine_foo.lib │ │ │ └── engine_main.lib │ │ │ ├── x86_64-win32 │ │ │ ├── engine.rc │ │ │ ├── defold.ico │ │ │ ├── OpenAL32.lib │ │ │ ├── engine_foo.lib │ │ │ └── engine_main.lib │ │ │ ├── darwin │ │ │ ├── libengine_foo.a │ │ │ ├── libengine_main.a │ │ │ └── x86-osx │ │ │ │ ├── libengine_foo.a │ │ │ │ └── libengine_main.a │ │ │ ├── js-web │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ │ │ ├── wasm-web │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ │ │ ├── arm64-ios │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ │ │ ├── arm64-osx │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ │ │ ├── armv7-ios │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ │ │ ├── x86_64-osx │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ │ │ ├── arm64-android │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ │ │ ├── armv7-android │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ │ │ ├── x86_64-darwin │ │ │ ├── libengine_foo.a │ │ │ ├── libengine_main.a │ │ │ └── x86_64-osx │ │ │ │ ├── libengine_foo.a │ │ │ │ └── libengine_main.a │ │ │ ├── x86_64-linux │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ │ │ └── x86_64-macos │ │ │ ├── libengine_foo.a │ │ │ ├── libengine_main.a │ │ │ └── x86_64-osx │ │ │ ├── libengine_foo.a │ │ │ └── libengine_main.a │ ├── testproject_appmanifest │ │ ├── ext │ │ │ ├── ext.manifest │ │ │ ├── lib │ │ │ │ ├── js-web │ │ │ │ │ └── libalib.a │ │ │ │ ├── arm64-ios │ │ │ │ │ └── libalib.a │ │ │ │ ├── arm64-osx │ │ │ │ │ └── libalib.a │ │ │ │ ├── armv7-ios │ │ │ │ │ └── libalib.a │ │ │ │ ├── wasm-web │ │ │ │ │ └── libalib.a │ │ │ │ ├── x86-linux │ │ │ │ │ └── libalib.a │ │ │ │ ├── x86-win32 │ │ │ │ │ └── alib.lib │ │ │ │ ├── x86_64-linux │ │ │ │ │ └── libalib.a │ │ │ │ ├── x86_64-osx │ │ │ │ │ └── libalib.a │ │ │ │ ├── x86_64-win32 │ │ │ │ │ └── alib.lib │ │ │ │ ├── arm64-android │ │ │ │ │ └── libalib.a │ │ │ │ └── armv7-android │ │ │ │ │ └── libalib.a │ │ │ └── src │ │ │ │ └── test_ext.cpp │ │ ├── ext2 │ │ │ ├── ext.manifest │ │ │ ├── lib │ │ │ │ ├── js-web │ │ │ │ │ └── libblib.a │ │ │ │ ├── android │ │ │ │ │ ├── Dummy1.jar │ │ │ │ │ └── Dummy2.jar │ │ │ │ ├── wasm-web │ │ │ │ │ └── libblib.a │ │ │ │ ├── x86-win32 │ │ │ │ │ └── blib.lib │ │ │ │ ├── arm64-ios │ │ │ │ │ └── libblib.a │ │ │ │ ├── arm64-osx │ │ │ │ │ └── libblib.a │ │ │ │ ├── armv7-ios │ │ │ │ │ └── libblib.a │ │ │ │ ├── x86-linux │ │ │ │ │ └── libblib.a │ │ │ │ ├── x86_64-osx │ │ │ │ │ └── libblib.a │ │ │ │ ├── x86_64-win32 │ │ │ │ │ └── blib.lib │ │ │ │ ├── arm64-android │ │ │ │ │ └── libblib.a │ │ │ │ ├── armv7-android │ │ │ │ │ └── libblib.a │ │ │ │ └── x86_64-linux │ │ │ │ │ └── libblib.a │ │ │ └── src │ │ │ │ └── test_ext.cpp │ │ ├── build.sh │ │ ├── README.txt │ │ ├── libsource │ │ │ ├── a.cpp │ │ │ └── b.cpp │ │ └── _app │ │ │ └── app.manifest │ ├── ext_error_extension │ │ ├── ext.manifest │ │ └── src │ │ │ └── test_error_ext.cpp │ ├── ext_use_base_extension │ │ ├── ext.manifest │ │ └── src │ │ │ └── test_ext.cpp │ ├── alib │ │ └── alib.cpp │ ├── testproject_appmanifest_variant │ │ └── _app │ │ │ └── app.manifest │ ├── checksum_sdk │ │ ├── test_sdk.sha256 │ │ ├── test_sdk_invalid.sha256 │ │ ├── test_sdk.zip │ │ ├── create_sdk.sh │ │ └── defoldsdk │ │ │ └── test_header.h │ ├── enginelibs │ │ ├── engine_main.cpp │ │ └── engine_foo.cpp │ ├── extendertest.platformnull.appmanifest │ ├── blib │ │ ├── blib.h │ │ └── blib.cpp │ ├── ext_dyn_libs2 │ │ ├── lib │ │ │ ├── x86-win32 │ │ │ │ └── dynamic_specific2.dll │ │ │ ├── x86_64-win32 │ │ │ │ └── dynamic_specific2.dll │ │ │ ├── arm64-ios │ │ │ │ └── libdynamic_specific2.so │ │ │ ├── arm64-osx │ │ │ │ └── libdynamic_specific2.dylib │ │ │ ├── x86_64-linux │ │ │ │ └── libdynamic_specific2.so │ │ │ ├── arm64-android │ │ │ │ └── libdynamic_specific2.so │ │ │ ├── armv7-android │ │ │ │ └── libdynamic_specific2.so │ │ │ ├── x86_64-osx │ │ │ │ └── libdynamic_specific2.dylib │ │ │ ├── js-web │ │ │ │ └── libdynamic_specific2.so │ │ │ └── wasm-web │ │ │ │ └── libdynamic_specific2.so │ │ ├── src │ │ │ └── extension.cpp │ │ └── ext.manifest │ ├── ext2 │ │ ├── lib │ │ │ ├── js-web │ │ │ │ ├── libalib.a │ │ │ │ └── libblib.a │ │ │ ├── arm64-ios │ │ │ │ ├── libalib.a │ │ │ │ └── libblib.a │ │ │ ├── arm64-osx │ │ │ │ ├── libalib.a │ │ │ │ └── libblib.a │ │ │ ├── armv7-ios │ │ │ │ ├── libalib.a │ │ │ │ └── libblib.a │ │ │ ├── wasm-web │ │ │ │ ├── libalib.a │ │ │ │ └── libblib.a │ │ │ ├── x86-win32 │ │ │ │ ├── alib.lib │ │ │ │ └── blib.lib │ │ │ ├── x86_64-osx │ │ │ │ ├── libalib.a │ │ │ │ └── libblib.a │ │ │ ├── x86_64-linux │ │ │ │ ├── libalib.a │ │ │ │ └── libblib.a │ │ │ ├── x86_64-win32 │ │ │ │ ├── alib.lib │ │ │ │ └── blib.lib │ │ │ ├── arm64-android │ │ │ │ ├── libalib.a │ │ │ │ └── libblib.a │ │ │ └── armv7-android │ │ │ │ ├── libalib.a │ │ │ │ └── libblib.a │ │ ├── ext.manifest │ │ └── src │ │ │ └── test_ext.cpp │ ├── ext3 │ │ ├── src │ │ │ ├── README.md │ │ │ └── extension.cpp │ │ └── ext.manifest │ ├── dynamic_specific1 │ │ └── dynamic_specific1.cpp │ ├── dynamic_specific2 │ │ └── dynamic_specific2.cpp │ ├── extendertest.emptycontext.manifest │ ├── _app │ │ └── rjava │ │ │ └── com │ │ │ └── dummy │ │ │ └── R.java │ ├── appmanifests │ │ ├── ext1.manifest │ │ ├── app.appmanifest │ │ └── ext2.manifest │ ├── stdlib │ │ ├── std.cpp │ │ └── std.h │ ├── headless.appmanifest │ ├── test_query.sh │ ├── extendertest.appmanifest │ ├── xcconfigs │ │ ├── include_test.xcconfig │ │ ├── KSCrash.xcconfig │ │ ├── AppMetricaLog.xcconfig │ │ ├── VGSLFundamentals.xcconfig │ │ ├── AppLovinSDK.xcconfig │ │ ├── YandexMobileMetrica.xcconfig │ │ ├── Sentry.xcconfig │ │ ├── MintegralAdSDK.xcconfig │ │ └── DivKit.xcconfig │ ├── createdebugsdk.sh │ ├── manifest_override │ │ └── upload │ │ │ ├── _app │ │ │ └── app.manifest │ │ │ └── extension1 │ │ │ └── ext.manifest │ ├── pod_specs │ │ ├── AXPracticalHUD.json │ │ ├── UnityAds.json │ │ ├── PNChartboostSDKAdapter.json │ │ ├── TPNiOS.json │ │ ├── Wilddog.json │ │ └── Sentry.json │ ├── build-libs.sh │ └── AndroidManifest.xml ├── envs │ ├── .env │ └── macos.env ├── users │ ├── testusers.txt │ └── users.txt ├── configs │ ├── application-metrics.yml │ ├── application-local-dev-android.yml │ ├── application-logging.yml │ ├── extender-logging.xml │ ├── application-local-dev.yml │ ├── application-standalone-dev.yml │ ├── application-test-app.yml │ ├── application-local-dev-app.yml │ └── application-influx.yml ├── src │ ├── main │ │ ├── resources │ │ │ ├── template.local.properties │ │ │ ├── template.modulemap │ │ │ ├── template.podfile │ │ │ ├── template.gradle.properties │ │ │ ├── template.csproj │ │ │ └── template.build.gradle │ │ └── java │ │ │ └── com │ │ │ └── defold │ │ │ └── extender │ │ │ ├── services │ │ │ ├── data │ │ │ │ ├── GCPInstanceState.java │ │ │ │ └── DefoldSdk.java │ │ │ ├── cocoapods │ │ │ │ ├── PodfileParsingException.java │ │ │ │ ├── IConfigParser.java │ │ │ │ ├── MainPodfile.java │ │ │ │ ├── PlatformAndLanguageSet.java │ │ │ │ ├── PlatformSet.java │ │ │ │ ├── LanguageSet.java │ │ │ │ ├── CocoaPodsServiceBuildState.java │ │ │ │ └── CreateBuildSpecArgs.java │ │ │ ├── GradleServiceInterface.java │ │ │ ├── MockGradleService.java │ │ │ ├── DefoldSdkServiceConfiguration.java │ │ │ └── GradleService.java │ │ │ ├── ManifestConfiguration.java │ │ │ ├── AppManifestPlatformConfig.java │ │ │ ├── Timer.java │ │ │ ├── AppManifestConfiguration.java │ │ │ ├── Configuration.java │ │ │ ├── cache │ │ │ ├── DataCacheException.java │ │ │ ├── DataCache.java │ │ │ ├── DummyDataCache.java │ │ │ ├── info │ │ │ │ ├── CacheInfoFileWriter.java │ │ │ │ ├── CacheInfoFileParser.java │ │ │ │ └── CacheInfoWrapper.java │ │ │ ├── CacheEntry.java │ │ │ ├── CacheKeyGenerator.java │ │ │ └── DataCacheFactory.java │ │ │ ├── ManifestPlatformConfig.java │ │ │ ├── BuilderConstants.java │ │ │ ├── remote │ │ │ ├── RemoteBuildException.java │ │ │ ├── RemoteHostConfiguration.java │ │ │ └── RemoteInstanceConfig.java │ │ │ ├── ExtenderException.java │ │ │ ├── ExtenderConst.java │ │ │ ├── log │ │ │ ├── Markers.java │ │ │ ├── ExtenderLogEnhancer.java │ │ │ └── ExtenderLogEnhancerConfiguration.java │ │ │ ├── VersionNotSupportedException.java │ │ │ ├── PlatformNotSupportedException.java │ │ │ ├── WhitelistConfig.java │ │ │ ├── ExtenderApplication.java │ │ │ ├── tracing │ │ │ ├── ExtenderTracerInterceptor.java │ │ │ └── TraceIdInResponseServletFilter.java │ │ │ ├── ExtenderYamlSafeConstructor.java │ │ │ ├── utils │ │ │ └── FrameworkUtil.java │ │ │ ├── process │ │ │ └── ProcessUtils.java │ │ │ ├── TemplateExecutor.java │ │ │ ├── TreePrinter.java │ │ │ └── PlatformConfig.java │ └── test │ │ ├── resources │ │ ├── junit-platform.properties │ │ └── upload │ │ │ ├── dir2 │ │ │ └── test2.txt │ │ │ ├── old-ne-cache-info.json │ │ │ ├── ne-cache-info.json │ │ │ └── dir │ │ │ └── test1.txt │ │ └── java │ │ └── com │ │ └── defold │ │ └── extender │ │ ├── TemplateExecutorTest.java │ │ ├── cache │ │ ├── DummyDataCacheTest.java │ │ ├── CacheKeyGeneratorTest.java │ │ └── info │ │ │ ├── CacheInfoFileWriterTest.java │ │ │ └── CacheInfoFileParserTest.java │ │ ├── TestUtils.java │ │ └── ZipUtilsTest.java ├── gradle.properties ├── manifestmergetool │ ├── README.md │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── defold │ │ │ └── manifestmergetool │ │ │ └── MergePolicy.java │ │ └── resources │ │ └── PropertyList-1.0.dtd ├── scripts │ └── stop-test-server.sh └── docker │ ├── Dockerfile.nssdk.1832-env │ ├── Dockerfile.ps4.12000-env │ ├── Dockerfile.ps5.10000-env │ ├── Dockerfile.android-env │ ├── Dockerfile.linux-env │ ├── common-services.yml │ ├── Dockerfile.emsdk.406-env │ ├── Dockerfile.emsdk.3155-env │ ├── Dockerfile.emsdk.3165-env │ └── Dockerfile.wine-env ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .vscode ├── settings.json ├── extensions.json └── launch.json ├── .idea ├── vcs.xml ├── modules │ ├── client │ │ ├── extender.client.main.iml │ │ └── extender.client.test.iml │ └── server │ │ └── extender.server.main.iml ├── misc.xml ├── runConfigurations │ ├── Attach_to_java_process_inside_docker.xml │ └── Run_standalone_Extender.xml ├── gradle.xml └── modules.xml ├── client ├── scripts │ └── build_and_copy.sh ├── src │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── defold │ │ │ └── extender │ │ │ └── client │ │ │ ├── ExtenderResource.java │ │ │ ├── ExtenderClientException.java │ │ │ └── FileExtenderResource.java │ └── test │ │ └── java │ │ └── com │ │ └── defold │ │ └── extender │ │ └── client │ │ └── TestUtils.java └── build.gradle ├── README_CLIENT.md ├── settings.gradle ├── .github └── dependabot.yml ├── .gitignore └── LICENSE /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/podfiles/empty.Podfile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/testproject/b/ext.manifest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/testproject/b/include/b.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/testproject/b/src/b.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/query1/a.txt: -------------------------------------------------------------------------------- 1 | This is file A! -------------------------------------------------------------------------------- /server/test-data/query1/b.txt: -------------------------------------------------------------------------------- 1 | This is file B! -------------------------------------------------------------------------------- /server/test-data/testproject/b/lib/ios/ios.a: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/testproject/b/lib/osx/osx.a: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/jars/META-INF/inner.folder/com.inner: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/ext/lib/x86_64-win32/empty.lib/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/ext_basic/ext.manifest: -------------------------------------------------------------------------------- 1 | name: Test 2 | -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/ext.manifest: -------------------------------------------------------------------------------- 1 | name: Test 2 | -------------------------------------------------------------------------------- /server/test-data/invalidfilenames/ext.manifest: -------------------------------------------------------------------------------- 1 | name: "Test" -------------------------------------------------------------------------------- /server/test-data/jars/META-INF/inner.folder/inner.pom.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/testproject/b/lib/arm64-osx/x86-osx.a: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/invalidfilenames/include/foo;echo hello;.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/envs/.env: -------------------------------------------------------------------------------- 1 | SERVICE_NAME=extender 2 | ZIG_VERSION=0.11.0 3 | -------------------------------------------------------------------------------- /server/test-data/ext_std/ext.manifest: -------------------------------------------------------------------------------- 1 | name: MyExtension 2 | 3 | -------------------------------------------------------------------------------- /server/test-data/jars/META-INF/inner.folder/inner.pom.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/extender/variants/debug.appmanifest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/jars/META-INF/inner.folder/io.foo.service.HTTPClient: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/ext.manifest: -------------------------------------------------------------------------------- 1 | name: Ext1 2 | -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/ext.manifest: -------------------------------------------------------------------------------- 1 | name: Ext2 2 | -------------------------------------------------------------------------------- /server/users/testusers.txt: -------------------------------------------------------------------------------- 1 | bobuser = bobpassword,ROLE_LINUX,enabled 2 | -------------------------------------------------------------------------------- /server/test-data/ext_error_extension/ext.manifest: -------------------------------------------------------------------------------- 1 | name: ext_error_extension 2 | -------------------------------------------------------------------------------- /server/configs/application-metrics.yml: -------------------------------------------------------------------------------- 1 | management.metrics.tags.instance: ${INSTANCE_ID} -------------------------------------------------------------------------------- /server/src/main/resources/template.local.properties: -------------------------------------------------------------------------------- 1 | sdk.dir={{android-sdk-root}} 2 | -------------------------------------------------------------------------------- /server/test-data/ext_use_base_extension/ext.manifest: -------------------------------------------------------------------------------- 1 | name: ext_use_base_extension 2 | -------------------------------------------------------------------------------- /server/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.logging.stacktrace=all 2 | org.gradle.logging.level=info -------------------------------------------------------------------------------- /server/test-data/alib/alib.cpp: -------------------------------------------------------------------------------- 1 | 2 | int alib_mul(int x, int y) 3 | { 4 | return x * y; 5 | } 6 | -------------------------------------------------------------------------------- /server/test-data/podfiles/wrong.Podfile: -------------------------------------------------------------------------------- 1 | pod 2 | pod 'IronSourceSuperAwesomeAdapter','4.1.11.3' -------------------------------------------------------------------------------- /server/test-data/ext/include/ext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | extern "C" 4 | { 5 | void Test(); 6 | }; 7 | -------------------------------------------------------------------------------- /server/test-data/ext_basic/include/ext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | extern "C" 4 | { 5 | void Test(); 6 | }; 7 | -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest_variant/_app/app.manifest: -------------------------------------------------------------------------------- 1 | context: 2 | baseVariant: debug 3 | -------------------------------------------------------------------------------- /server/test-data/checksum_sdk/test_sdk.sha256: -------------------------------------------------------------------------------- 1 | 870fc09cc9165118a650fb50774f37183e9266665db6aadf516775f4b4905fb4 -------------------------------------------------------------------------------- /server/test-data/testproject/a/notincluded.h: -------------------------------------------------------------------------------- 1 | // not an extension. This file should never be passed in to a build -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /server/test-data/checksum_sdk/test_sdk_invalid.sha256: -------------------------------------------------------------------------------- 1 | 8ebbc73fd435a72d2730f1a00954a6c869d6ed832d1ae59bd77ff3028c78ebdb -------------------------------------------------------------------------------- /server/test-data/enginelibs/engine_main.cpp: -------------------------------------------------------------------------------- 1 | int engine_main(int argc, char* argv[]) 2 | { 3 | return 0; 4 | } 5 | -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/x86-win32/dynamic_specific1.dll: -------------------------------------------------------------------------------- 1 | ext_dyn_libs/lib/x86-win32/dynamic_specific1.dll 2 | -------------------------------------------------------------------------------- /server/test-data/extendertest.platformnull.appmanifest: -------------------------------------------------------------------------------- 1 | # By leaving the value empty, it will become null 2 | platforms: -------------------------------------------------------------------------------- /server/test-data/blib/blib.h: -------------------------------------------------------------------------------- 1 | #ifndef BLIB_H 2 | #endif BLIB_H 3 | 4 | int blib_mul(int x, int y); 5 | 6 | #endif // BLIB_H -------------------------------------------------------------------------------- /server/test-data/enginelibs/engine_foo.cpp: -------------------------------------------------------------------------------- 1 | 2 | extern "C" int FooSymbol(int a, int b) 3 | { 4 | return a / b; 5 | } 6 | -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/x86-win32/dynamic_specific2.dll: -------------------------------------------------------------------------------- 1 | ext_dyn_libs2/lib/x86-win32/dynamic_specific2.dll 2 | -------------------------------------------------------------------------------- /server/manifestmergetool/README.md: -------------------------------------------------------------------------------- 1 | Run tests: 2 | 3 | ```sh 4 | # Run tests with info-level logging 5 | gradle test -i 6 | ``` -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/x86_64-win32/dynamic_specific1.dll: -------------------------------------------------------------------------------- 1 | ext_dyn_libs/lib/x86_64-win32/dynamic_specific1.dll 2 | -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/x86_64-win32/dynamic_specific2.dll: -------------------------------------------------------------------------------- 1 | ext_dyn_libs2/lib/x86_64-win32/dynamic_specific2.dll 2 | -------------------------------------------------------------------------------- /server/test-data/ext/lib/js-web/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/js-web/libalib.a -------------------------------------------------------------------------------- /server/users/users.txt: -------------------------------------------------------------------------------- 1 | user = password,ROLE_ANDROID,ROLE_IOS,ROLE_HTML5,ROLE_WINDOWS,ROLE_LINUX,ROLE_MACOS,ROLE_SWITCH,disabled 2 | -------------------------------------------------------------------------------- /server/test-data/checksum_sdk/test_sdk.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/checksum_sdk/test_sdk.zip -------------------------------------------------------------------------------- /server/test-data/ext/lib/android/Dummy.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/android/Dummy.jar -------------------------------------------------------------------------------- /server/test-data/ext/lib/android/JarDep.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/android/JarDep.jar -------------------------------------------------------------------------------- /server/test-data/ext/lib/wasm-web/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/wasm-web/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext/lib/x86-win32/alib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/x86-win32/alib.lib -------------------------------------------------------------------------------- /server/test-data/ext2/lib/js-web/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/js-web/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/js-web/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/js-web/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext3/src/README.md: -------------------------------------------------------------------------------- 1 | This extension is testing that the linker can handle no .lib suffix with linking 2 | with old pipeline. -------------------------------------------------------------------------------- /server/configs/application-local-dev-android.yml: -------------------------------------------------------------------------------- 1 | extender: 2 | instance-type: BUILDER_ONLY 3 | gradle: 4 | enabled: true 5 | -------------------------------------------------------------------------------- /server/test-data/dynamic_specific1/dynamic_specific1.cpp: -------------------------------------------------------------------------------- 1 | 2 | extern "C" int SpecificSymbol(int a, int b) 3 | { 4 | return a + b; 5 | } 6 | -------------------------------------------------------------------------------- /server/test-data/dynamic_specific2/dynamic_specific2.cpp: -------------------------------------------------------------------------------- 1 | 2 | extern "C" int SpecificSymbol2(int a, int b) 3 | { 4 | return a - b; 5 | } 6 | -------------------------------------------------------------------------------- /server/test-data/ext/lib/android/meta-inf.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/android/meta-inf.jar -------------------------------------------------------------------------------- /server/test-data/ext/lib/arm64-ios/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/arm64-ios/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext/lib/arm64-osx/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/arm64-osx/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext/lib/armv7-ios/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/armv7-ios/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext/lib/x86_64-osx/blib.framework/README.txt: -------------------------------------------------------------------------------- 1 | # Not a real framework, but it's here to appear like one in the file structure -------------------------------------------------------------------------------- /server/test-data/ext/lib/x86_64-osx/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/x86_64-osx/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext/lib/x86_64-win32/alib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/x86_64-win32/alib.lib -------------------------------------------------------------------------------- /server/test-data/ext2/lib/arm64-ios/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/arm64-ios/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/arm64-ios/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/arm64-ios/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/arm64-osx/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/arm64-osx/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/arm64-osx/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/arm64-osx/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/armv7-ios/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/armv7-ios/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/armv7-ios/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/armv7-ios/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/wasm-web/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/wasm-web/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/wasm-web/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/wasm-web/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/x86-win32/alib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/x86-win32/alib.lib -------------------------------------------------------------------------------- /server/test-data/ext2/lib/x86-win32/blib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/x86-win32/blib.lib -------------------------------------------------------------------------------- /server/test-data/ext2/lib/x86_64-osx/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/x86_64-osx/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/x86_64-osx/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/x86_64-osx/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/js-web/libstd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/js-web/libstd.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/wasm-web/libstd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/wasm-web/libstd.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/x86-win32/std.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/x86-win32/std.lib -------------------------------------------------------------------------------- /server/test-data/ext/lib/android/VeryLarge1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/android/VeryLarge1.jar -------------------------------------------------------------------------------- /server/test-data/ext/lib/android/VeryLarge2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/android/VeryLarge2.jar -------------------------------------------------------------------------------- /server/test-data/ext/lib/arm64-android/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/arm64-android/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext/lib/armv7-android/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/armv7-android/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext/lib/x86_64-linux/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext/lib/x86_64-linux/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/x86_64-linux/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/x86_64-linux/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/x86_64-linux/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/x86_64-linux/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/x86_64-win32/alib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/x86_64-win32/alib.lib -------------------------------------------------------------------------------- /server/test-data/ext2/lib/x86_64-win32/blib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/x86_64-win32/blib.lib -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/arm64-ios/libstd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/arm64-ios/libstd.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/arm64-osx/libstd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/arm64-osx/libstd.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/armv7-ios/libstd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/armv7-ios/libstd.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/x86_64-osx/libstd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/x86_64-osx/libstd.a -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.compile.nullAnalysis.mode": "automatic", 3 | "java.configuration.updateBuildConfiguration": "automatic" 4 | } -------------------------------------------------------------------------------- /server/src/main/resources/template.modulemap: -------------------------------------------------------------------------------- 1 | 2 | module {{MODULE_ID}}.Swift { 3 | header "{{{HEADER}}}" 4 | export * 5 | requires objc 6 | } 7 | -------------------------------------------------------------------------------- /server/test-data/ext/src/Test.java: -------------------------------------------------------------------------------- 1 | package com.defold; 2 | 3 | class Test { 4 | static String doStuff() { 5 | return "test"; 6 | } 7 | } -------------------------------------------------------------------------------- /server/test-data/ext2/ext.manifest: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | platforms: 4 | arm64-osx: 5 | context: 6 | frameworks: ["AVFoundation"] 7 | 8 | -------------------------------------------------------------------------------- /server/test-data/ext2/lib/arm64-android/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/arm64-android/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/arm64-android/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/arm64-android/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/armv7-android/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/armv7-android/libalib.a -------------------------------------------------------------------------------- /server/test-data/ext2/lib/armv7-android/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext2/lib/armv7-android/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/arm64-android/libstd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/arm64-android/libstd.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/armv7-android/libstd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/armv7-android/libstd.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/x86_64-linux/libstd.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/x86_64-linux/libstd.a -------------------------------------------------------------------------------- /server/test-data/ext_std/lib/x86_64-win32/std.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_std/lib/x86_64-win32/std.lib -------------------------------------------------------------------------------- /server/src/test/resources/junit-platform.properties: -------------------------------------------------------------------------------- 1 | junit.jupiter.execution.parallel.enabled = true 2 | junit.jupiter.execution.parallel.mode.default = concurrent -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/share/java/Engine.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/share/java/Engine.jar -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/share/java/build.sh: -------------------------------------------------------------------------------- 1 | 2 | javac -source 1.8 -target 1.8 -cp . com/defoldtest/engine/Engine.java 3 | jar cvf Engine.jar com 4 | -------------------------------------------------------------------------------- /server/test-data/ext/ext.manifest: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | 4 | 5 | platforms: 6 | arm64-osx: 7 | context: 8 | frameworks: ["AVFoundation"] 9 | 10 | -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/linux/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/linux/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86-win32/defold.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86-win32/defold.ico -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86-win32/engine.rc: -------------------------------------------------------------------------------- 1 | LANGUAGE 9, 1 2 | 3 | #define IDI_APPICON 100 4 | 5 | IDI_APPICON ICON "defold.ico" 6 | 7 | -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-win32/engine.rc: -------------------------------------------------------------------------------- 1 | LANGUAGE 9, 1 2 | 3 | #define IDI_APPICON 100 4 | 5 | IDI_APPICON ICON "defold.ico" 6 | 7 | -------------------------------------------------------------------------------- /server/test-data/extendertest.emptycontext.manifest: -------------------------------------------------------------------------------- 1 | # Leaving the context empty will leave a null pointer 2 | platforms: 3 | x86_64-osx: 4 | context: 5 | 6 | -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/darwin/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/darwin/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/darwin/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/darwin/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/js-web/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/js-web/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/js-web/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/js-web/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/linux/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/linux/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/wasm-web/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/wasm-web/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86-win32/OpenAL32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86-win32/OpenAL32.lib -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86-win32/engine_foo.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86-win32/engine_foo.lib -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-win32/defold.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-win32/defold.ico -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/build.sh: -------------------------------------------------------------------------------- 1 | 2 | source ../compile.sh 3 | 4 | Compile alib libsource/a.cpp ext/lib 5 | Compile blib libsource/b.cpp ext2/lib 6 | 7 | -------------------------------------------------------------------------------- /server/test-data/ext3/src/extension.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" 4 | { 5 | void MyExtension() 6 | { 7 | printf("Hello Test\n"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /server/test-data/ext_basic/src/test_ext.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" 4 | { 5 | void Test() 6 | { 7 | printf("Hello Test\n"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/src/test_ext.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" 4 | { 5 | void Test() 6 | { 7 | printf("Hello Test\n"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/arm64-ios/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/arm64-ios/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/arm64-ios/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/arm64-ios/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/arm64-osx/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/arm64-osx/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/arm64-osx/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/arm64-osx/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/armv7-ios/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/armv7-ios/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/armv7-ios/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/armv7-ios/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/wasm-web/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/wasm-web/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86-win32/engine_main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86-win32/engine_main.lib -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-osx/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-osx/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-win32/OpenAL32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-win32/OpenAL32.lib -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/arm64-android/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/arm64-android/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/armv7-android/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/armv7-android/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-darwin/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-darwin/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-linux/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-linux/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-linux/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-linux/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-macos/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-macos/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-macos/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-macos/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-osx/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-osx/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-win32/engine_foo.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-win32/engine_foo.lib -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-win32/engine_main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-win32/engine_main.lib -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/js-web/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/js-web/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/js-web/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/js-web/libblib.a -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/arm64-ios/libdynamic_specific1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs/lib/arm64-ios/libdynamic_specific1.so -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/arm64-ios/libdynamic_specific2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs2/lib/arm64-ios/libdynamic_specific2.so -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/src/extension.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" 4 | { 5 | void MyExtension() 6 | { 7 | printf("Hello Test\n"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/arm64-android/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/arm64-android/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/armv7-android/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/armv7-android/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/darwin/x86-osx/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/darwin/x86-osx/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/darwin/x86-osx/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/darwin/x86-osx/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/linux/x86-linux/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/linux/x86-linux/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-darwin/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-darwin/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/arm64-ios/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/arm64-ios/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/arm64-osx/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/arm64-osx/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/armv7-ios/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/armv7-ios/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/wasm-web/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/wasm-web/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/x86-linux/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/x86-linux/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/x86-win32/alib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/x86-win32/alib.lib -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/android/Dummy1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/android/Dummy1.jar -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/android/Dummy2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/android/Dummy2.jar -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/wasm-web/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/wasm-web/libblib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/x86-win32/blib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/x86-win32/blib.lib -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/arm64-android/libdynamic_specific1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs/lib/arm64-android/libdynamic_specific1.so -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/arm64-osx/libdynamic_specific1.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs/lib/arm64-osx/libdynamic_specific1.dylib -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/armv7-android/libdynamic_specific1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs/lib/armv7-android/libdynamic_specific1.so -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/x86_64-linux/libdynamic_specific1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs/lib/x86_64-linux/libdynamic_specific1.so -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/x86_64-osx/libdynamic_specific1.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs/lib/x86_64-osx/libdynamic_specific1.dylib -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/arm64-osx/libdynamic_specific2.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs2/lib/arm64-osx/libdynamic_specific2.dylib -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/x86_64-linux/libdynamic_specific2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs2/lib/x86_64-linux/libdynamic_specific2.so -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/linux/x86-linux/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/linux/x86-linux/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/x86_64-linux/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/x86_64-linux/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/x86_64-osx/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/x86_64-osx/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/x86_64-win32/alib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/x86_64-win32/alib.lib -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/arm64-ios/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/arm64-ios/libblib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/arm64-osx/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/arm64-osx/libblib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/armv7-ios/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/armv7-ios/libblib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/x86-linux/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/x86-linux/libblib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/x86_64-osx/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/x86_64-osx/libblib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/x86_64-win32/blib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/x86_64-win32/blib.lib -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/arm64-android/libdynamic_specific2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs2/lib/arm64-android/libdynamic_specific2.so -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/armv7-android/libdynamic_specific2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs2/lib/armv7-android/libdynamic_specific2.so -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/x86_64-osx/libdynamic_specific2.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/ext_dyn_libs2/lib/x86_64-osx/libdynamic_specific2.dylib -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/arm64-android/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/arm64-android/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/lib/armv7-android/libalib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext/lib/armv7-android/libalib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/arm64-android/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/arm64-android/libblib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/armv7-android/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/armv7-android/libblib.a -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/lib/x86_64-linux/libblib.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/testproject_appmanifest/ext2/lib/x86_64-linux/libblib.a -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /server/test-data/ext/src/TestJar.java: -------------------------------------------------------------------------------- 1 | package com.defold; 2 | 3 | import com.defold.JarDep; 4 | 5 | class Test { 6 | static String doStuff() { 7 | return JarDep.DoStuff(); 8 | } 9 | } -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-macos/x86_64-osx/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-macos/x86_64-osx/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/_app/rjava/com/dummy/R.java: -------------------------------------------------------------------------------- 1 | package com.dummy; 2 | 3 | public final class R { 4 | public static final class raw { 5 | public static final int apa=0x7f040000; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-darwin/x86_64-osx/libengine_foo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-darwin/x86_64-osx/libengine_foo.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-darwin/x86_64-osx/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-darwin/x86_64-osx/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/lib/x86_64-macos/x86_64-osx/libengine_main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/extender/HEAD/server/test-data/sdk/a/defoldsdk/lib/x86_64-macos/x86_64-osx/libengine_main.a -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/js-web/libdynamic_specific1.so: -------------------------------------------------------------------------------- 1 | asmdylink.0`8env __memory_baseenv __table_baseenvmemory0__wasm_call_ctors__wasm_apply_data_relocs 2 |   -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs/lib/wasm-web/libdynamic_specific1.so: -------------------------------------------------------------------------------- 1 | asmdylink.0`8env __memory_baseenv __table_baseenvmemory0__wasm_call_ctors__wasm_apply_data_relocs 2 |   -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/js-web/libdynamic_specific2.so: -------------------------------------------------------------------------------- 1 | asmdylink.0`8env __memory_baseenv __table_baseenvmemory0__wasm_call_ctors__wasm_apply_data_relocs 2 |   -------------------------------------------------------------------------------- /server/test-data/jars/com/defold/dummy/Dummy.java: -------------------------------------------------------------------------------- 1 | package com.defold.dummy; 2 | 3 | public class Dummy { 4 | static public String DoStuff() { 5 | return "Hello from the other siiiiiiide!!!"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/lib/wasm-web/libdynamic_specific2.so: -------------------------------------------------------------------------------- 1 | asmdylink.0`8env __memory_baseenv __table_baseenvmemory0__wasm_call_ctors__wasm_apply_data_relocs 2 |   -------------------------------------------------------------------------------- /server/test-data/jars/io/foo/dummy/FooDummy.java: -------------------------------------------------------------------------------- 1 | package io.foo.dummy; 2 | 3 | public class FooDummy { 4 | static public String TestStuff() { 5 | return "Join the dark side! We have cookies!"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /client/scripts/build_and_copy.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | (cd client && ../gradlew build && cp -v ./build/libs/extender-client-0.0.5.jar $DYNAMO_HOME/../../com.dynamo.cr/com.dynamo.cr.common/ext/extender-client-0.0.5.jar) 4 | -------------------------------------------------------------------------------- /server/test-data/blib/blib.cpp: -------------------------------------------------------------------------------- 1 | 2 | extern int alib_mul(int x, int y); 3 | 4 | int blib_add(int x, int y) 5 | { 6 | return x + y; 7 | } 8 | 9 | int blib_mul(int x, int y) 10 | { 11 | return alib_mul(x, y); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /server/test-data/appmanifests/ext1.manifest: -------------------------------------------------------------------------------- 1 | platforms: 2 | linux: 3 | context: 4 | libs: ["profile", "profilerext", "profiler_remotery"] 5 | symbols: ['ProfilerExt', 'ProfilerBasic', 'ProfilerRemotery'] 6 | -------------------------------------------------------------------------------- /server/test-data/checksum_sdk/create_sdk.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | zip -r test_sdk.zip defoldsdk/ 3 | printf '%s' "$(sha256 -q ./test_sdk.zip)" > test_sdk.sha256 4 | printf '%s' "$(sha256 -q ./defoldsdk/sdk_file_1.yml)" > test_sdk_invalid.sha256 5 | -------------------------------------------------------------------------------- /server/test-data/sdk/a/defoldsdk/share/java/com/defoldtest/engine/Engine.java: -------------------------------------------------------------------------------- 1 | package com.defoldtest.engine; 2 | 3 | public class Engine { 4 | static public String Test() { 5 | return "Hello from the SDK!!!"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/data/GCPInstanceState.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.data; 2 | 3 | public class GCPInstanceState { 4 | public volatile long lastTimeTouched = System.currentTimeMillis(); 5 | } 6 | -------------------------------------------------------------------------------- /server/test-data/ext3/ext.manifest: -------------------------------------------------------------------------------- 1 | name: MyExtension 2 | 3 | platforms: 4 | x86-win32: 5 | context: 6 | libs: ["Crypt32"] 7 | 8 | x86_64-win32: 9 | context: 10 | libs: ["Crypt32"] -------------------------------------------------------------------------------- /server/test-data/ext_dyn_libs2/ext.manifest: -------------------------------------------------------------------------------- 1 | name: MyExtension 2 | 3 | platforms: 4 | x86-win32: 5 | context: 6 | libs: ["Crypt32"] 7 | 8 | x86_64-win32: 9 | context: 10 | libs: ["Crypt32"] -------------------------------------------------------------------------------- /server/test-data/podfiles/with_comments.Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '12.0' 3 | 4 | # some comment about dependency 5 | pod 'OneTrust-CMP-XCFramework', '202407.1.0.0' # some in one line -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "vmware.vscode-boot-dev-pack", 4 | "vscjava.vscode-spring-boot-dashboard", 5 | "redhat.java", "vscjava.vscode-gradle", 6 | "vscjava.vscode-java-debug", 7 | ] 8 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /server/test-data/ext/src/test_ext.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int alib_mul(int x, int y); 4 | 5 | extern "C" 6 | { 7 | void Test() 8 | { 9 | printf("Hello Test\n"); 10 | printf("10 + 20 = %d\n", alib_mul(10, 20)); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/README.txt: -------------------------------------------------------------------------------- 1 | # This test checks that we can build with an app manifest 2 | # the extension libraries are simly duplicates, thus causing a linker error 3 | # The manifest will resolve this by simply removing one of the libraries -------------------------------------------------------------------------------- /server/configs/application-logging.yml: -------------------------------------------------------------------------------- 1 | spring.main.banner-mode: "off" 2 | logging.config: /etc/defold/extender/extender-logging.xml 3 | logging.pattern.level: "%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]" 4 | management.tracing.sampling.probability: 1.0 -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/ManifestConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.util.Map; 4 | 5 | public class ManifestConfiguration { 6 | public Map platforms; 7 | public String name; 8 | } 9 | -------------------------------------------------------------------------------- /server/test-data/invalidfilenames/src/test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int alib_add(int, int); 4 | 5 | extern "C" 6 | { 7 | void Test() 8 | { 9 | printf("Hello Test\n"); 10 | printf("10 + 20 = %d\n", alib_add(10, 20)); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/AppManifestPlatformConfig.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | class AppManifestPlatformConfig { 7 | public Map context = new HashMap<>(); 8 | } 9 | -------------------------------------------------------------------------------- /server/src/main/resources/template.podfile: -------------------------------------------------------------------------------- 1 | platform :{{PLATFORM}}, '{{PLATFORM_VERSION}}' 2 | install! 'cocoapods', integrate_targets: false, skip_pods_project_generation: false 3 | {{#USE_FRAMEWORKS}}use_frameworks!{{/USE_FRAMEWORKS}} 4 | {{#PODS}} 5 | {{{.}}} 6 | {{/PODS}} 7 | -------------------------------------------------------------------------------- /server/test-data/stdlib/std.cpp: -------------------------------------------------------------------------------- 1 | #include "std.h" 2 | 3 | void dmStdTest::Combine(const std::string& a, const std::string& b, std::string& out) 4 | { 5 | out = a + b; 6 | } 7 | 8 | void dmStdTest::Insert(std::map& m, int key, const std::string& b) 9 | { 10 | m[key] = b; 11 | } -------------------------------------------------------------------------------- /server/test-data/podfiles/regular.Podfile: -------------------------------------------------------------------------------- 1 | pod 'IronSourcePangleAdapter','<=4.3.28.3' 2 | pod 'IronSourceSmaatoAdapter','>=4.3.13.3' 3 | pod 'IronSourceSuperAwesomeAdapter' 4 | pod 'IronSourceTencentAdapter','=4.3.6.3' 5 | pod 'IronSourceUnityAdsAdapter','->4.3.40.1' 6 | pod 'IronSourceYandexAdapter', '<4.3.1.1' -------------------------------------------------------------------------------- /server/test-data/stdlib/std.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace dmStdTest { 7 | 8 | void Combine(const std::string& a, const std::string& b, std::string& out); 9 | 10 | void Insert(std::map& m, int key, const std::string& b); 11 | 12 | }; 13 | -------------------------------------------------------------------------------- /server/configs/extender-logging.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /server/test-data/appmanifests/app.appmanifest: -------------------------------------------------------------------------------- 1 | platforms: 2 | linux: 3 | context: 4 | excludeLibs: ["profile_null", "profilerext_null", "record_null"] 5 | libs: ["profile", "profilerext", "profiler_remotery"] 6 | symbols: ['ProfilerExt', 'ProfilerBasic', 'ProfilerRemotery'] 7 | -------------------------------------------------------------------------------- /server/test-data/ext_std/include/std.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace dmStdTest { 7 | 8 | void Combine(const std::string& a, const std::string& b, std::string& out); 9 | 10 | void Insert(std::map& m, int key, const std::string& b); 11 | 12 | }; 13 | -------------------------------------------------------------------------------- /server/scripts/stop-test-server.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ "$APPLICATION" == "" ]; then 4 | APPLICATION="extender-test" 5 | fi 6 | 7 | echo "stop-test-server.sh: Stopping ${APPLICATION}:" 8 | 9 | docker compose -p $APPLICATION down 10 | 11 | echo "stop-test-server.sh: Test server ${APPLICATION} exited" 12 | -------------------------------------------------------------------------------- /server/src/test/resources/upload/dir2/test2.txt: -------------------------------------------------------------------------------- 1 | A merry little surge of electricity piped by automatic alarm from the mood organ beside his 2 | bed awakened Rick Deckard. Surprised - it always surprised him to find himself awake 3 | without prior notice - he rose from the bed, stood up in his multicolored pajamas, and 4 | stretched. -------------------------------------------------------------------------------- /server/test-data/query1/ne-cache-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | { 4 | "path": "a.txt", 5 | "key": "9f51adb73a7fea871dcaef6838ce776853212af6ce42d0cc9ce5221d69f8af0f" 6 | }, 7 | { 8 | "path": "b.txt", 9 | "key": "2b414ebf2f1734b3705990f21d1cf348495591c6b530e5cb3053738a461bdce7" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /client/src/main/java/com/defold/extender/client/ExtenderResource.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.client; 2 | 3 | import java.io.IOException; 4 | 5 | public interface ExtenderResource { 6 | 7 | String getPath(); 8 | 9 | byte[] getContent() throws IOException; 10 | 11 | long getLastModified(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/Timer.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | public class Timer { 4 | private long time; 5 | 6 | public long start() { 7 | long now = System.currentTimeMillis(); 8 | long t = now - time; 9 | time = now; 10 | return t; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /server/test-data/checksum_sdk/defoldsdk/test_header.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace dmStdTest { 7 | 8 | void Combine(const std::string& a, const std::string& b, std::string& out); 9 | 10 | void Insert(std::map& m, int key, const std::string& b); 11 | 12 | }; 13 | -------------------------------------------------------------------------------- /server/test-data/ext2/src/test_ext.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int blib_add(int x, int y); 4 | int blib_mul(int x, int y); 5 | 6 | extern "C" 7 | { 8 | void Test() 9 | { 10 | printf("Hello Test\n"); 11 | printf("10 + 20 = %d\n", blib_add(10, 20)); 12 | printf("10 * 20 = %d\n", blib_mul(10, 20)); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /server/test-data/headless.appmanifest: -------------------------------------------------------------------------------- 1 | platforms: 2 | x86_64-osx: 3 | context: 4 | excludeLibs: ["record","vpx","sound","tremolo","graphics","hid"] 5 | excludeSymbols: ["DefaultSoundDevice","AudioDecoderWav","AudioDecoderStbVorbis","AudioDecoderTremolo"] 6 | libs: ["record_null","sound_null","graphics_null","hid_null"] 7 | -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/libsource/a.cpp: -------------------------------------------------------------------------------- 1 | extern int g_MyValue; 2 | 3 | int test_function(int a) 4 | { 5 | return a; 6 | } 7 | 8 | extern "C" void a_insert(int key, int value) 9 | { 10 | g_MyValue = g_MyValue + test_function(value); 11 | } 12 | 13 | extern "C" int a_get(int key) 14 | { 15 | return g_MyValue + test_function(key); 16 | } -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/AppManifestConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class AppManifestConfiguration { 7 | public Map platforms = new HashMap<>(); 8 | public Map context = new HashMap<>(); 9 | } 10 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/cocoapods/PodfileParsingException.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.cocoapods; 2 | 3 | import com.defold.extender.ExtenderException; 4 | 5 | public class PodfileParsingException extends ExtenderException { 6 | public PodfileParsingException(String reason) { 7 | super(reason); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext/src/test_ext.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" { 4 | void a_insert(int key, int value); 5 | int a_get(int key); 6 | } 7 | 8 | extern "C" 9 | { 10 | void Ext1() 11 | { 12 | printf("Hello Ext1\n"); 13 | a_insert(10,20); 14 | printf("get 10 = %d\n", a_get(10)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/ext2/src/test_ext.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" { 4 | void b_insert(int key, int value); 5 | int b_get(int key); 6 | } 7 | 8 | extern "C" 9 | { 10 | void Ext2() 11 | { 12 | printf("Hello Ext2\n"); 13 | b_insert(20,30); 14 | printf("get 20 = %d\n", b_get(20)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/Configuration.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.util.Map; 4 | 5 | public class Configuration { 6 | public Map platforms; 7 | public Map context; 8 | public String main; 9 | public WhitelistConfig whitelist; // Already a deprecated var! TODO: Remove 10 | } 11 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/cocoapods/IConfigParser.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.cocoapods; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.Map; 6 | 7 | public interface IConfigParser { 8 | public Map parse(String moduleName, String podName, File xcconfig) throws IOException; 9 | } 10 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/cache/DataCacheException.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache; 2 | 3 | class DataCacheException extends Exception { 4 | public DataCacheException(String message) { 5 | super(message); 6 | } 7 | 8 | public DataCacheException(String message, Throwable cause) { 9 | super(message, cause); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.idea/modules/client/extender.client.main.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/modules/client/extender.client.test.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/_app/app.manifest: -------------------------------------------------------------------------------- 1 | platforms: 2 | common: 3 | context: 4 | excludeSymbols: ["FooSymbol"] 5 | excludeLibs: ["alib", "engine_foo"] 6 | 7 | arm64-osx: 8 | context: 9 | excludeLibs: ["alib"] 10 | 11 | android: 12 | context: 13 | excludeJars: ["(.*)/Dummy1.jar"] 14 | -------------------------------------------------------------------------------- /README_CLIENT.md: -------------------------------------------------------------------------------- 1 | 2 | # Extender Client 3 | 4 | There is a client part of the Extender code which is used in Bob.jar. 5 | 6 | 1. Build the client 7 | 8 | $ cd client 9 | $ ../gradlew build 10 | 11 | 1. Copy the client to Bob 12 | 13 | $ cp -v ./build/libs/extender-client-0.0.1.jar /com.dynamo.cr/com.dynamo.cr.common/ext/extender-client-0.0.1.jar 14 | 15 | 16 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/ManifestPlatformConfig.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | class ManifestPlatformConfig { 7 | public Map bundle = new HashMap<>(); // used on the content pipeline side (2023-02-08: UNUSED?) 8 | public Map context = new HashMap<>(); 9 | } 10 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/BuilderConstants.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | public class BuilderConstants { 4 | public static final String BUILD_RESULT_FILENAME = "build.zip"; 5 | public static final String BUILD_ERROR_FILENAME = "error.txt"; 6 | 7 | public enum JobStatus { 8 | NOT_FOUND, 9 | SUCCESS, 10 | ERROR 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/cache/DataCache.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | 7 | public interface DataCache { 8 | InputStream get(String key); 9 | boolean exists(String key); 10 | void touch(String key); 11 | void put(String key, File file) throws IOException; 12 | } 13 | -------------------------------------------------------------------------------- /server/envs/macos.env: -------------------------------------------------------------------------------- 1 | SWIFT_5_5_VERSION=5.5 2 | IOS_VERSION_MIN=11.0 3 | MACOS_VERSION_MIN=10.15 4 | XCODE_16_VERSION=16.2 5 | XCODE_16_CLANG_VERSION=16.0.0 6 | MACOS_15_VERSION=15.2 7 | IOS_18_VERSION=18.2 8 | SWIFT_6_2_VERSION=6.2 9 | IOS_26_VERSION_MIN=15.0 10 | MACOS_26_VERSION_MIN=11.5 11 | XCODE_26_VERSION=26.2 12 | XCODE_26_CLANG_VERSION=17.0.0 13 | MACOS_26_VERSION=26.2 14 | IOS_26_VERSION=26.2 15 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/remote/RemoteBuildException.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.remote; 2 | 3 | public class RemoteBuildException extends RuntimeException { 4 | 5 | public RemoteBuildException(String message, Throwable cause) { 6 | super(message, cause); 7 | } 8 | 9 | public RemoteBuildException(String message) { 10 | super(message); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | IDE 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /client/src/main/java/com/defold/extender/client/ExtenderClientException.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.client; 2 | 3 | public class ExtenderClientException extends Exception { 4 | 5 | public ExtenderClientException(String message) { 6 | super(message); 7 | } 8 | 9 | public ExtenderClientException(String message, Throwable cause) { 10 | super(message, cause); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /server/test-data/test_query.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | JSONFILE=$1 4 | if [ "$JSONFILE" == "" ]; then 5 | echo "You didn't specify a json file!" 6 | exit 1 7 | fi 8 | 9 | curl --progress-bar -H "Content-Type: application/json" -d @$JSONFILE http://localhost:9000/query -v 10 | #curl --progress-bar -H "Content-Type: application/json" -d @server/test-data/query1/ne-cache-info.json http://localhost:9000/query -v 11 | -------------------------------------------------------------------------------- /server/src/main/resources/template.gradle.properties: -------------------------------------------------------------------------------- 1 | # Gradle will use the Jetifier tool to migrate dependencies to Android X if android.enableJetifier is true 2 | android.enableJetifier={{android-enable-jetifier}} 3 | 4 | # Gradle will stop resolving dependencies if android.useAndroidX is false and a dependency is using Android X 5 | android.useAndroidX={{android-enable-jetifier}} 6 | 7 | org.gradle.java.home=/usr/local/jdk-25+36 8 | -------------------------------------------------------------------------------- /server/src/test/resources/upload/old-ne-cache-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | { 4 | "path": "dir/test1.txt", 5 | "key": "2d8c2f6d978ca21712b5f6de36c9d31fa8e96a4fa5d8ff8b0188dfb9e7c171bb", 6 | "cached": true 7 | }, 8 | { 9 | "path": "dir2/test2.txt", 10 | "key": "7f3b61aeb34a8ea15c675ffddaa6af6a6fbdd031ed9786dcb2b35b351a132b31", 11 | "cached": true 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /server/configs/application-local-dev.yml: -------------------------------------------------------------------------------- 1 | extender: 2 | instance-type: BUILDER_ONLY 3 | # sdk.location: /usr/local/extender/sdk 4 | cache: 5 | enabled: true 6 | local.basedir: /var/extender/cache/data 7 | type: LOCAL 8 | 9 | job-result: 10 | location: /var/extender/results 11 | cleanup-period: 20000 12 | 13 | logging.pattern.level: "%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]" -------------------------------------------------------------------------------- /.idea/modules/server/extender.server.main.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /server/src/test/resources/upload/ne-cache-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "hashType": "sha256", 4 | "files": [ 5 | { 6 | "path": "dir/test1.txt", 7 | "key": "2d8c2f6d978ca21712b5f6de36c9d31fa8e96a4fa5d8ff8b0188dfb9e7c171bb", 8 | "cached": true 9 | }, 10 | { 11 | "path": "dir2/test2.txt", 12 | "key": "7f3b61aeb34a8ea15c675ffddaa6af6a6fbdd031ed9786dcb2b35b351a132b31", 13 | "cached": true 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /server/src/test/resources/upload/dir/test1.txt: -------------------------------------------------------------------------------- 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | maven { 4 | url = uri("https://plugins.gradle.org/m2/") 5 | } 6 | } 7 | } 8 | 9 | plugins { 10 | id 'com.google.cloud.artifactregistry.gradle-plugin' version '2.2.5' apply false 11 | } 12 | 13 | include ":server" 14 | 15 | include 'client' 16 | project(':client').projectDir = file('client') 17 | 18 | include 'manifestmergetool' 19 | project(':manifestmergetool').projectDir = file('server/manifestmergetool') 20 | -------------------------------------------------------------------------------- /server/test-data/ext_use_base_extension/src/test_ext.cpp: -------------------------------------------------------------------------------- 1 | 2 | // The "test-data" folder is part of the upload folder in our integration tests 3 | // For actual extensions it would be "ext/include/ext.h" 4 | #include 5 | #include 6 | 7 | extern "C" 8 | { 9 | void ext_use_base_extension() // Need to have the symbol specified in the ext.manifest 10 | { 11 | printf("Hello From TestUseBaseExtension\n"); 12 | Test(); 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /server/test-data/extendertest.appmanifest: -------------------------------------------------------------------------------- 1 | platforms: 2 | common: 3 | context: 4 | flags: ["-fno-exceptions"] 5 | excludeSymbols: ["SymbolA"] 6 | x86_64-osx: 7 | context: 8 | flags: ["-fno-rtti"] 9 | excludeSymbols: ["SymbolB"] 10 | x86-win32: 11 | context: 12 | excludeSymbols: ["SymbolC"] 13 | x86_64-win32: 14 | context: 15 | excludeSymbols: ["SymbolC"] 16 | -------------------------------------------------------------------------------- /server/test-data/appmanifests/ext2.manifest: -------------------------------------------------------------------------------- 1 | platforms: 2 | common: 3 | context: 4 | defines: ["DM_RELEASE"] 5 | 6 | linux: 7 | context: 8 | excludeLibs: ["engine", "engine_service", "profile", "profilerext", "profiler_remotery", "record", "vpx"] 9 | libs: ["engine_release", "engine_service_null", "profile_null", "profilerext_null", "record_null"] 10 | excludeSymbols: ['ProfilerExt', 'ProfilerBasic', 'ProfilerRemotery'] 11 | -------------------------------------------------------------------------------- /server/docker/Dockerfile.nssdk.1832-env: -------------------------------------------------------------------------------- 1 | FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-wine-env:1.5.0 2 | 3 | ENV NINTENDO_SDK_ROOT_18_3=${PLATFORMSDK_DIR}/nx-18.3.2 4 | ENV SWITCH_SDK_18_FILENAME=nx64-sdk-18.3.2.tar.gz 5 | 6 | RUN --mount=type=secret,id=DM_PACKAGES_URL,required=true \ 7 | echo "Switch SDK 18.3.2" && \ 8 | mkdir -p ${NINTENDO_SDK_ROOT_18_3} && \ 9 | wget -q -O - $(cat /run/secrets/DM_PACKAGES_URL)/${SWITCH_SDK_18_FILENAME} | tar xz -C ${NINTENDO_SDK_ROOT_18_3} -------------------------------------------------------------------------------- /server/manifestmergetool/src/main/java/com/defold/manifestmergetool/MergePolicy.java: -------------------------------------------------------------------------------- 1 | package com.defold.manifestmergetool; 2 | 3 | public enum MergePolicy { 4 | KEEP, 5 | MERGE, 6 | REPLACE; 7 | 8 | public static MergePolicy fromString(String s) { 9 | switch (s) { 10 | case "keep": 11 | return MergePolicy.KEEP; 12 | case "replace": 13 | return MergePolicy.REPLACE; 14 | default: 15 | return MergePolicy.MERGE; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/ExtenderException.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | public class ExtenderException extends Exception { 4 | private final String output; 5 | 6 | public ExtenderException(String output) { 7 | super(output); 8 | this.output = output; 9 | } 10 | 11 | public ExtenderException(Exception e, String output) { 12 | super(e); 13 | this.output = output; 14 | } 15 | 16 | String getOutput() { 17 | return output; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /server/docker/Dockerfile.ps4.12000-env: -------------------------------------------------------------------------------- 1 | FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-wine-env:1.5.0 2 | 3 | ENV PS4_SDK_VERSION=12.000 4 | ENV PS4_SDK=${PLATFORMSDK_DIR}/ps4-sdk-${PS4_SDK_VERSION} 5 | 6 | ENV PS4_SDK_FILENAME=ps4-sdk-${PS4_SDK_VERSION}.tar.gz 7 | 8 | RUN --mount=type=secret,id=DM_PACKAGES_URL,required=true \ 9 | echo "PS4 ${PS4_SDK_FILENAME}" && \ 10 | mkdir -p ${PS4_SDK} && \ 11 | wget -q -O - $(cat /run/secrets/DM_PACKAGES_URL)/${PS4_SDK_FILENAME} | tar xz -C ${PS4_SDK} --strip-components=1 12 | -------------------------------------------------------------------------------- /server/docker/Dockerfile.ps5.10000-env: -------------------------------------------------------------------------------- 1 | FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-wine-env:1.5.0 2 | 3 | ENV PS5_SDK_VERSION=10.000 4 | ENV PS5_SDK=${PLATFORMSDK_DIR}/ps5-sdk-${PS5_SDK_VERSION} 5 | 6 | ENV PS5_SDK_FILENAME=ps5-sdk-${PS5_SDK_VERSION}.tar.gz 7 | 8 | RUN --mount=type=secret,id=DM_PACKAGES_URL,required=true \ 9 | echo "PS5 ${PS5_SDK_FILENAME}" && \ 10 | mkdir -p ${PS5_SDK} && \ 11 | wget -q -O - $(cat /run/secrets/DM_PACKAGES_URL)/${PS5_SDK_FILENAME} | tar xz -C ${PS5_SDK} --strip-components=1 12 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/ExtenderConst.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | public class ExtenderConst { 4 | public static final String SOURCE_CODE_ARCHIVE_MAGIC_NAME = "__source_code__.zip"; 5 | public static final String FRAMEWORK_RE = "(.+)\\.framework"; 6 | public static final String JAR_RE = "(.+\\.jar)"; 7 | public static final String JS_RE = "(.+\\.js)"; 8 | public static final String PROTO_RE = "(?i).*(\\.proto)"; 9 | public static final String ENGINE_JAR_RE = "(?:.*)\\/share\\/java\\/[\\w\\-\\.]*\\.jar$"; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /server/test-data/ext_error_extension/src/test_error_ext.cpp: -------------------------------------------------------------------------------- 1 | 2 | // The "test-data" folder is part of the upload folder in our integration tests 3 | // For actual extensions it would be "ext/include/ext.h" 4 | #include 5 | #include 6 | 7 | extern "C" 8 | { 9 | void ext_error_extension() // Need to have the symbol specified in the ext.manifest 10 | { 11 | printf("Hello From TestUseBaseExtension\n"); 12 | Test(); 13 | if (UndefinedFunction(13, "function")) 14 | { 15 | printf("Never reach"); 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /server/test-data/testproject_appmanifest/libsource/b.cpp: -------------------------------------------------------------------------------- 1 | int g_MyValue = 20; 2 | 3 | int test_function(int a) 4 | { 5 | return a + 1; 6 | } 7 | 8 | extern "C" void b_insert(int key, int value) 9 | { 10 | g_MyValue = g_MyValue + test_function(value); 11 | } 12 | 13 | extern "C" int b_get(int key) 14 | { 15 | return g_MyValue + test_function(key); 16 | } 17 | 18 | 19 | extern "C" void a_insert(int key, int value) 20 | { 21 | g_MyValue = g_MyValue + test_function(value); 22 | } 23 | 24 | extern "C" int a_get(int key) 25 | { 26 | return g_MyValue + test_function(key); 27 | } -------------------------------------------------------------------------------- /client/src/test/java/com/defold/extender/client/TestUtils.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.client; 2 | 3 | import java.io.File; 4 | import java.io.FileWriter; 5 | import java.io.IOException; 6 | import java.time.Instant; 7 | 8 | public class TestUtils { 9 | public static void writeToFile(String path, String msg) throws IOException { 10 | File f = new File(path); 11 | FileWriter fwr = new FileWriter(f); 12 | fwr.write(msg); 13 | fwr.flush(); 14 | fwr.close(); 15 | f.setLastModified(Instant.now().toEpochMilli() + 23); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/log/Markers.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.log; 2 | 3 | import org.slf4j.Marker; 4 | import org.slf4j.MarkerFactory; 5 | 6 | public class Markers { 7 | public static final Marker SERVER_ERROR = MarkerFactory.getMarker("SERVER_ERROR"); 8 | public static final Marker COMPILATION_ERROR = MarkerFactory.getMarker("COMPILATION_ERROR"); 9 | public static final Marker INSTANCE_MANAGER_ERROR = MarkerFactory.getMarker("INSTANCE_MANAGER_ERROR"); 10 | public static final Marker CACHE_ERROR = MarkerFactory.getMarker("CACHE_ERROR"); 11 | } 12 | -------------------------------------------------------------------------------- /server/test-data/xcconfigs/include_test.xcconfig: -------------------------------------------------------------------------------- 1 | #include "other_pod/other.xcconfig" 2 | 3 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 4 | GCC_ENABLE_CPP_EXCEPTIONS = YES 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | - package-ecosystem: "gradle" 13 | directories: 14 | - "/" 15 | schedule: 16 | interval: "weekly" -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/remote/RemoteHostConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.remote; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import org.springframework.boot.context.properties.ConfigurationProperties; 7 | import org.springframework.stereotype.Component; 8 | 9 | @Component 10 | @ConfigurationProperties(prefix = "extender.remote-builder") 11 | public class RemoteHostConfiguration { 12 | private Map platforms = new HashMap<>(); 13 | 14 | public Map getPlatforms() { 15 | return platforms; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /server/configs/application-standalone-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 9010 3 | 4 | extender: 5 | instance-type: MIXED 6 | sdk: 7 | location: /usr/local/extender/sdk 8 | cache-clear-on-exit: false 9 | cache: 10 | enabled: false 11 | remote-builder: 12 | enabled: false 13 | cocoapods: 14 | enabled: true 15 | home-dir-prefix: /tmp/extender/.cocoapods 16 | repo-update-cron: "0 0 * * * *" # update spec repo every 1 h 17 | cache-dir-rotate-cron: "0 10 2 * * *" # once per day 18 | old-cache-clean-cron: "0 10 6 * * *" # once per day after directory rotation 19 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/VersionNotSupportedException.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | public class VersionNotSupportedException extends ExtenderException { 4 | private static String ERROR_MESSAGE = "Engine version '%s' is not supported on the current server. Please, use latest stable version. https://github.com/defold/defold/releases/latest"; 5 | 6 | public VersionNotSupportedException(String version) { 7 | super(String.format(ERROR_MESSAGE, version)); 8 | } 9 | 10 | public VersionNotSupportedException(Exception e, String version) { 11 | super(e, String.format(ERROR_MESSAGE, version)); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/cache/DummyDataCache.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache; 2 | 3 | import java.io.File; 4 | import java.io.InputStream; 5 | 6 | public class DummyDataCache implements DataCache { 7 | 8 | @Override 9 | public InputStream get(final String key) { 10 | return null; 11 | } 12 | 13 | @Override 14 | public boolean exists(String key) { 15 | return false; 16 | } 17 | 18 | @Override 19 | public void touch(String key) { 20 | // Do nothing 21 | } 22 | 23 | @Override 24 | public void put(final String key, final File file) { 25 | // Do nothing 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/GradleServiceInterface.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import com.defold.extender.ExtenderBuildState; 9 | import com.defold.extender.ExtenderException; 10 | 11 | public interface GradleServiceInterface { 12 | // Resolve dependencies, download them, extract to 13 | public List resolveDependencies(ExtenderBuildState buildState, Map env, List outputFiles) throws IOException, ExtenderException; 14 | 15 | public long getCacheSize() throws IOException; 16 | } 17 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/PlatformNotSupportedException.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | public class PlatformNotSupportedException extends ExtenderException { 4 | private static String ERROR_MESSAGE = "Platform '%s' is not supported on the current server. Please, check build server address. If error will persist - create task here https://github.com/defold/extender/issues"; 5 | 6 | public PlatformNotSupportedException(String platform) { 7 | super(String.format(ERROR_MESSAGE, platform)); 8 | } 9 | 10 | public PlatformNotSupportedException(Exception e, String platform) { 11 | super(e, String.format(ERROR_MESSAGE, platform)); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/remote/RemoteInstanceConfig.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.remote; 2 | 3 | public class RemoteInstanceConfig { 4 | private String url; 5 | private String instanceId; 6 | private boolean alwaysOn; 7 | 8 | public RemoteInstanceConfig(String url, String instanceId, boolean alwaysOn) { 9 | this.url = url; 10 | this.instanceId = instanceId; 11 | this.alwaysOn = alwaysOn; 12 | } 13 | 14 | public String getUrl() { 15 | return url; 16 | } 17 | 18 | public String getInstanceId() { 19 | return instanceId; 20 | } 21 | 22 | public boolean getAlwaysOn() { 23 | return alwaysOn; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.idea/runConfigurations/Attach_to_java_process_inside_docker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/cache/info/CacheInfoFileWriter.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache.info; 2 | 3 | import com.defold.extender.cache.CacheEntry; 4 | import com.fasterxml.jackson.databind.ObjectMapper; 5 | import org.springframework.stereotype.Service; 6 | 7 | import java.io.IOException; 8 | import java.io.OutputStream; 9 | import java.util.List; 10 | 11 | @Service 12 | public class CacheInfoFileWriter { 13 | 14 | private ObjectMapper objectMapper = new ObjectMapper(); 15 | 16 | public void write(int version, String hashType, List entries, OutputStream outputStream) throws IOException { 17 | objectMapper.writer().writeValue(outputStream, new CacheInfoWrapper(version, hashType, entries)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /server/src/test/java/com/defold/extender/TemplateExecutorTest.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import org.junit.jupiter.api.Test; 7 | 8 | import static org.assertj.core.api.Assertions.assertThat; 9 | 10 | public class TemplateExecutorTest { 11 | 12 | @Test 13 | public void templateVariablesShouldBeReplacedByContext() { 14 | TemplateExecutor templateExecutor = new TemplateExecutor(); 15 | String template = "Hello {{name}}!"; 16 | Map context = new HashMap<>(); 17 | context.put("name", "James"); 18 | String result = templateExecutor.execute(template, context); 19 | assertThat(result).isEqualTo("Hello James!"); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /server/test-data/createdebugsdk.sh: -------------------------------------------------------------------------------- 1 | 2 | # not really a sha, but the name of the folder 3 | SHA1=debugsdk 4 | 5 | # defold> ./scripts/build.py build_platform_sdk --platform js-web 6 | # Wrote /var/folders/5s/ll5cfsq52p5516swlrjrmv540000gp/T/tmpEBfCxg 7 | PLATFORM=js-web 8 | 9 | function create_zip { 10 | local platform=$1 11 | local target=$2 12 | 13 | pushd $DYNAMO_HOME/../.. 14 | 15 | #./scripts/build.py build_platform_sdk --platform $platform > _log.txt 16 | 17 | #result=`cat _log.txt | grep -e Wrote` 18 | result="Wrote /var/folders/5s/ll5cfsq52p5516swlrjrmv540000gp/T/tmp0FHQN_" 19 | 20 | rm _log.txt 21 | 22 | popd 23 | 24 | result=`echo $result | sed s/Wrote\ //` 25 | 26 | echo RESULT: $result 27 | 28 | unzip $result -d $target 29 | } 30 | 31 | create_zip js-web sdk/$SHA1 -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/cache/info/CacheInfoFileParser.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache.info; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import org.springframework.stereotype.Service; 5 | 6 | import java.io.File; 7 | import java.io.IOException; 8 | import java.io.InputStream; 9 | 10 | @Service 11 | public class CacheInfoFileParser { 12 | 13 | private ObjectMapper objectMapper = new ObjectMapper(); 14 | 15 | public CacheInfoWrapper parse(final File file) throws IOException { 16 | return objectMapper.readerFor(CacheInfoWrapper.class).readValue(file); 17 | } 18 | 19 | public CacheInfoWrapper parse(final InputStream inputStream) throws IOException { 20 | return objectMapper.readerFor(CacheInfoWrapper.class).readValue(inputStream); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/log/ExtenderLogEnhancer.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.log; 2 | 3 | import com.google.cloud.logging.LogEntry.Builder; 4 | import com.google.cloud.logging.LoggingEnhancer; 5 | import com.google.cloud.logging.logback.LoggingEventEnhancer; 6 | 7 | 8 | import ch.qos.logback.classic.spi.ILoggingEvent; 9 | 10 | public class ExtenderLogEnhancer implements LoggingEnhancer, LoggingEventEnhancer { 11 | @Override 12 | public void enhanceLogEntry(Builder builder) { 13 | if (ExtenderLogEnhancerConfiguration.isInitialized()) { 14 | builder.setResource(ExtenderLogEnhancerConfiguration.getMonitoredResource()); 15 | } 16 | } 17 | 18 | @Override 19 | public void enhanceLogEntry(Builder builder, ILoggingEvent e) { 20 | enhanceLogEntry(builder); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 | 21 | -------------------------------------------------------------------------------- /server/test-data/xcconfigs/KSCrash.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/KSCrash 3 | GCC_ENABLE_CPP_EXCEPTIONS = YES 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/KSCrash" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/KSCrash" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/KSCrash 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /server/test-data/xcconfigs/AppMetricaLog.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AppMetricaLog 3 | DEFINES_MODULE = YES 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AppMetricaLog" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppMetricaLog" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/AppMetricaLog 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /server/test-data/xcconfigs/VGSLFundamentals.xcconfig: -------------------------------------------------------------------------------- 1 | BUILD_LIBRARY_FOR_DISTRIBUTION = NO 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/VGSLFundamentals 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" -enable-experimental-feature AccessLevelOnImport 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/VGSLFundamentals 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /server/test-data/manifest_override/upload/_app/app.manifest: -------------------------------------------------------------------------------- 1 | context: 2 | baseVariant: release 3 | 4 | platforms: 5 | armv7-ios: 6 | context: 7 | excludeLibs: [profile_null] 8 | arm64-ios: 9 | context: 10 | excludeLibs: [profile_null] 11 | x86_64-ios: 12 | context: 13 | excludeLibs: [profile_null] 14 | armv7-android: 15 | context: 16 | excludeLibs: [profile_null] 17 | arm64-android: 18 | context: 19 | excludeLibs: [profile_null] 20 | x86_64-osx: 21 | context: 22 | excludeLibs: [profile_null] 23 | x86_64-linux: 24 | context: 25 | excludeLibs: [profile_null] 26 | js-web: 27 | context: 28 | excludeLibs: [profile_null] 29 | wasm-web: 30 | context: 31 | excludeLibs: [profile_null] 32 | wasm_pthread-web: 33 | context: 34 | excludeLibs: [profile_null] 35 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/WhitelistConfig.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | import java.util.regex.Pattern; 6 | 7 | class WhitelistConfig { 8 | public Map context = new HashMap<>(); 9 | 10 | // Used to verify C++ defines before adding them on the command line 11 | // DEFINE 12 | // DEFINE= 13 | // DEFINE=123value 14 | public String defineRe = "^([A-Za-z_][A-Za-z0-9_]+)(|=|=[A-Za-z0-9_]+)$"; 15 | public String libraryRe = "(\\w[\\w\\.+-]*)"; 16 | 17 | public WhitelistConfig() { 18 | context.put("arg", "[a-zA-Z][a-zA-Z0-9-_]+"); 19 | context.put("comma_separated_arg", "[a-zA-Z][a-zA-Z0-9-_]+"); 20 | context.put("number", "[0-9]+"); 21 | context.put("warning", "[a-zA-Z][a-zA-Z0-9-_+]+"); 22 | } 23 | 24 | static Pattern compile(String re) { 25 | return Pattern.compile(String.format("^(%s)$", re)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/cocoapods/MainPodfile.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.cocoapods; 2 | 3 | import java.io.File; 4 | import java.util.Set; 5 | 6 | public class MainPodfile { 7 | public Set podDefinitions; 8 | public String platformMinVersion; 9 | public String platform; 10 | public File file; 11 | public boolean useFrameworks = true; // left true by default for now for backward compatability 12 | 13 | @Override 14 | public String toString() { 15 | StringBuilder sb = new StringBuilder(); 16 | sb.append("file: " + file); 17 | sb.append("pod count: " + podDefinitions.size() + "\n"); 18 | sb.append("pod definitions: " + podDefinitions + "\n"); 19 | sb.append("platform: " + platform + "\n"); 20 | sb.append("min version: " + platformMinVersion + "\n"); 21 | sb.append("use framerorks: " + String.valueOf(useFrameworks) + "\n"); 22 | return sb.toString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/cocoapods/PlatformAndLanguageSet.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.cocoapods; 2 | 3 | import java.util.List; 4 | 5 | public class PlatformAndLanguageSet { 6 | public LanguageSet ios = new LanguageSet(); 7 | public LanguageSet osx = new LanguageSet(); 8 | 9 | public void addAll(PlatformAndLanguageSet v) { 10 | ios.addAll(v.ios); 11 | osx.addAll(v.osx); 12 | } 13 | public void addAll(List values) { 14 | for (String v : values) { 15 | ios.add(v); 16 | osx.add(v); 17 | } 18 | } 19 | 20 | public void remove(String value) { 21 | ios.remove(value); 22 | osx.remove(value); 23 | } 24 | 25 | @Override 26 | public String toString() { 27 | StringBuilder sb = new StringBuilder(); 28 | sb.append("ios: " + ios.toString()); 29 | sb.append(" osx: " + osx.toString()); 30 | return sb.toString(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /server/src/test/java/com/defold/extender/cache/DummyDataCacheTest.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertFalse; 4 | import static org.junit.jupiter.api.Assertions.assertNull; 5 | 6 | import java.io.File; 7 | 8 | import org.junit.jupiter.api.BeforeEach; 9 | import org.junit.jupiter.api.Test; 10 | 11 | public class DummyDataCacheTest { 12 | 13 | private DataCache cache; 14 | 15 | @BeforeEach 16 | public void setUp() { 17 | cache = new DummyDataCache(); 18 | } 19 | 20 | @Test 21 | public void makeSureCacheAlwaysReturnsNull() throws Exception { 22 | assertNull(cache.get("iAmNotHere")); 23 | assertFalse(cache.exists("iAmNotHere")); 24 | 25 | File file = new File(ClassLoader.getSystemResource("upload/dir/test1.txt").toURI()); 26 | cache.put("iAmNotHere", file); 27 | 28 | assertNull(cache.get("iAmNotHere")); 29 | assertFalse(cache.exists("iAmNotHere")); 30 | } 31 | } -------------------------------------------------------------------------------- /server/test-data/manifest_override/upload/extension1/ext.manifest: -------------------------------------------------------------------------------- 1 | name: Extension1 2 | 3 | platforms: 4 | armv7-ios: 5 | context: 6 | excludeLibs: [profilerext_null] 7 | arm64-ios: 8 | context: 9 | excludeLibs: [profilerext_null] 10 | x86_64-ios: 11 | context: 12 | excludeLibs: [profilerext_null] 13 | armv7-android: 14 | context: 15 | excludeLibs: [profilerext_null] 16 | arm64-android: 17 | context: 18 | excludeLibs: [profilerext_null] 19 | x86_64-osx: 20 | context: 21 | excludeLibs: [profilerext_null] 22 | x86_64-linux: 23 | context: 24 | excludeLibs: [profilerext_null] 25 | js-web: 26 | context: 27 | excludeLibs: [profilerext_null] 28 | wasm-web: 29 | context: 30 | excludeLibs: [profilerext_null] 31 | wasm_pthread-web: 32 | context: 33 | excludeLibs: [profilerext_null] 34 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/ExtenderApplication.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | import org.springframework.core.env.Environment; 9 | import org.springframework.scheduling.annotation.EnableAsync; 10 | import org.springframework.scheduling.annotation.EnableScheduling; 11 | 12 | @SpringBootApplication 13 | @EnableAsync 14 | @EnableScheduling 15 | public class ExtenderApplication { 16 | 17 | private static final Logger LOGGER = LoggerFactory.getLogger(ExtenderApplication.class); 18 | 19 | private final Environment environment; 20 | 21 | public ExtenderApplication(Environment environment) { 22 | this.environment = environment; 23 | } 24 | 25 | public static void main(String[] args) { 26 | SpringApplication.run(ExtenderApplication.class, args); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /server/docker/Dockerfile.android-env: -------------------------------------------------------------------------------- 1 | FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.5.0 2 | 3 | # Technically part of the Android build, but also required by the GradleService.java 4 | # until it can be disabled (e.g. by looking for the existance of GRADLE_USER_HOME) 5 | 6 | # Versions: https://developer.android.com/studio/releases/gradle-plugin?buildsystem=ndk-build#updating-gradle 7 | # Java+Gradle version matrix: https://docs.gradle.org/current/userguide/compatibility.html 8 | ENV GRADLE_USER_HOME=/tmp/.gradle 9 | ENV GRADLE_VERSION=9.1.0 10 | ENV GRADLE_PLUGIN_VERSION=8.13.0 11 | ENV PATH=${PATH}:/opt/gradle/gradle-${GRADLE_VERSION}/bin 12 | RUN \ 13 | echo "Gradle" && \ 14 | wget -q https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip && \ 15 | mkdir /opt/gradle && \ 16 | unzip -q -d /opt/gradle gradle-${GRADLE_VERSION}-bin.zip && \ 17 | rm gradle-${GRADLE_VERSION}-bin.zip && \ 18 | which gradle && \ 19 | chown -R extender: /opt/gradle 20 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/cache/CacheEntry.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache; 2 | 3 | public class CacheEntry { 4 | 5 | private String key; 6 | private String path; 7 | private boolean cached; 8 | 9 | @SuppressWarnings("unused") 10 | CacheEntry() { 11 | } 12 | 13 | public CacheEntry(final String key, final String path, final boolean cached) { 14 | this.key = key; 15 | this.path = path; 16 | this.cached = cached; 17 | } 18 | 19 | public String getKey() { 20 | return key; 21 | } 22 | 23 | public void setKey(final String key) { 24 | this.key = key; 25 | } 26 | 27 | public String getPath() { 28 | return path; 29 | } 30 | 31 | public void setPath(final String path) { 32 | this.path = path; 33 | } 34 | 35 | public boolean isCached() { 36 | return cached; 37 | } 38 | 39 | public void setCached(final boolean cached) { 40 | this.cached = cached; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/MockGradleService.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 9 | import org.springframework.stereotype.Service; 10 | 11 | import com.defold.extender.ExtenderBuildState; 12 | import com.defold.extender.ExtenderException; 13 | 14 | @Service 15 | @ConditionalOnProperty(name = "extender.gradle.enabled", havingValue = "false", matchIfMissing = true) 16 | public class MockGradleService implements GradleServiceInterface { 17 | @Override 18 | public List resolveDependencies(ExtenderBuildState buildState, Map env, List outputFiles) 19 | throws IOException, ExtenderException { 20 | return List.of(); 21 | } 22 | 23 | @Override 24 | public long getCacheSize() throws IOException { 25 | return 0; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /server/test-data/xcconfigs/AppLovinSDK.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AppLovinSDK 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppLovinSDK/applovin-ios-sdk-13.0.1" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppLovinSDK" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | OTHER_LDFLAGS = $(inherited) -ObjC 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/AppLovinSDK 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /server/docker/Dockerfile.linux-env: -------------------------------------------------------------------------------- 1 | FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.5.0 2 | 3 | RUN \ 4 | echo "LINUX TOOLS + COMPILER" && \ 5 | apt-get update && \ 6 | apt-get install -y --no-install-recommends \ 7 | libssl-dev \ 8 | openssl \ 9 | libtool \ 10 | autoconf \ 11 | automake \ 12 | build-essential \ 13 | uuid-dev \ 14 | libxi-dev \ 15 | libx11-xcb-dev \ 16 | libopenal-dev \ 17 | libgl1-mesa-dev \ 18 | libglw1-mesa-dev \ 19 | freeglut3-dev 20 | 21 | # 22 | # llvm 23 | # 24 | ENV CLANG_VERSION=17 25 | RUN \ 26 | echo "LLVM + CLANG ${CLANG_VERSION}" && \ 27 | wget https://apt.llvm.org/llvm.sh && \ 28 | chmod +x llvm.sh && \ 29 | ./llvm.sh ${CLANG_VERSION} && \ 30 | rm llvm.sh 31 | 32 | ENV CLANG_17_HOME=/usr/lib/llvm-${CLANG_VERSION} 33 | # Possibly get the "-resource-dir" from clang++ -### empty.cpp 34 | ENV CLANG_17_RESOURCE_DIR=/usr/lib/llvm-${CLANG_VERSION}/lib/clang/${CLANG_VERSION} 35 | ENV PATH=${CLANG_17_HOME}/bin:$PATH -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/cache/info/CacheInfoWrapper.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache.info; 2 | 3 | import com.defold.extender.cache.CacheEntry; 4 | import com.fasterxml.jackson.annotation.JsonProperty; 5 | 6 | import java.util.List; 7 | 8 | public class CacheInfoWrapper { 9 | 10 | private int version; 11 | 12 | private String hashType; 13 | 14 | @JsonProperty("files") 15 | private List entries; 16 | 17 | @SuppressWarnings("unused") 18 | CacheInfoWrapper() { 19 | } 20 | 21 | // Used when writing to disc 22 | CacheInfoWrapper(int version, String hashType, List entries) { 23 | this.version = version; 24 | this.hashType = hashType; 25 | this.entries = entries; 26 | } 27 | 28 | public List getEntries() { 29 | return entries; 30 | } 31 | 32 | public int getVersion() { 33 | return version; 34 | } 35 | 36 | public String getHashType() { 37 | return hashType; 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "type": "java", 5 | "name": "Attach to java process inside docker", 6 | "request": "attach", 7 | "hostName": "localhost", 8 | "port": "5005" 9 | }, 10 | { 11 | "type": "java", 12 | "name": "Spring Boot-ExtenderApplication", 13 | "request": "launch", 14 | "cwd": "${workspaceFolder}", 15 | "vmArgs": "-Dorg.eclipse.jetty.server.Request.maxFormKeys=1500", 16 | "mainClass": "com.defold.extender.ExtenderApplication", 17 | "projectName": "server", 18 | "args": "--spring.config.location=classpath:./,file:${workspaceFolder}/server/configs/ --extender.sdk.location=${workspaceFolder}/server/app/sdk --spring.profiles.active=standalone-dev", 19 | "envFile": ["${workspaceFolder}/server/envs/.env", "${workspaceFolder}/server/envs/user.env", "${workspaceFolder}/server/envs/macos.env"] 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /server/test-data/pod_specs/AXPracticalHUD.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AXPracticalHUD", 3 | "version": "1.0.4", 4 | "summary": "A practical hud view in iOS.", 5 | "description": "A practical hud view in iOS.\n\n* Think: Why did you write this? What is the focus? What does it do?\n* CocoaPods will be using this to generate tags, and improve search results.\n* Try to keep it short, snappy and to the point.\n* Finally, don't worry about the indent, CocoaPods strips it!", 6 | "homepage": "https://github.com/devedbox/AXPracticalHUD", 7 | "license": "MIT", 8 | "authors": { 9 | "艾星": "862099730@qq.com" 10 | }, 11 | "platforms": { 12 | "ios": "7.0" 13 | }, 14 | "source": { 15 | "git": "https://github.com/devedbox/AXPracticalHUD.git", 16 | "tag": "1.0.4" 17 | }, 18 | "source_files": "AXPracticalHUD/AXPracticalHUD/*.{h,m}", 19 | "resources": "AXPracticalHUD/AXPracticalHUD/AXPracticalHUD.bundle/*.png", 20 | "frameworks": [ 21 | "UIKit", 22 | "Foundation" 23 | ], 24 | "requires_arc": true 25 | } 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/build 2 | **/classes 3 | /client/.buildcache 4 | /tmp 5 | /debugsdk 6 | /defoldsdk 7 | /localserver 8 | /platformsdk 9 | *.class 10 | !server/test-data/sdk/ 11 | server/test-data/sdk/* 12 | !server/test-data/sdk/a 13 | 14 | # C++ 15 | /**/*.o 16 | /**/*.pdb 17 | 18 | # IntelliJ IDEA 19 | .idea/* 20 | !/.idea/misc.xml 21 | !/.idea/modules.xml 22 | !/.idea/vcs.xml 23 | !/.idea/gradle.xml 24 | !/.idea/runConfigurations/ 25 | !/.idea/modules/ 26 | !/.idea/modules/extender.iml 27 | .idea/workspace.xml 28 | .idea/assetWizardSettings.xml 29 | .idea/dictionaries/ 30 | .idea/shelf/ 31 | .idea/libraries/ 32 | .idea/httpRequests/ 33 | /*.iml 34 | /*.ipr 35 | /*.iws 36 | /server/out 37 | 38 | # Eclipse 39 | /.classpath 40 | /.project 41 | /.settings 42 | 43 | # Gradle 44 | **/.gradle 45 | 46 | # Mac 47 | .DS_Store 48 | .bash_history 49 | 50 | Version.java 51 | /server/app/* 52 | server/bin/* 53 | server/manifestmergetool/app/* 54 | server/manifestmergetool/bin/* 55 | 56 | /server/docker/victoria-metrics-data/* 57 | /server/docker/grafana-data/* 58 | 59 | /server/envs/user.env 60 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/DefoldSdkServiceConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services; 2 | 3 | import java.nio.file.Path; 4 | 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | import org.springframework.stereotype.Component; 7 | 8 | import lombok.AllArgsConstructor; 9 | import lombok.Builder; 10 | import lombok.experimental.SuperBuilder; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @Component 16 | @ConfigurationProperties(prefix = "extender.sdk") 17 | @NoArgsConstructor 18 | @AllArgsConstructor 19 | @SuperBuilder(toBuilder = true) 20 | public class DefoldSdkServiceConfiguration { 21 | private Path location; 22 | private String[] sdkUrls; 23 | private String[] mappingsUrls; 24 | private int cacheSize; 25 | @Builder.Default private int mappingsCacheSize = 20; 26 | // retry count in case of checksum validation fail 27 | @Builder.Default private int maxVerificationRetryCount = 3; 28 | private boolean cacheClearOnExit; 29 | private boolean enableSdkVerification; 30 | } 31 | -------------------------------------------------------------------------------- /client/src/main/java/com/defold/extender/client/FileExtenderResource.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.client; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.nio.file.Files; 6 | 7 | public class FileExtenderResource implements ExtenderResource { 8 | private File file = null; 9 | private String filePath; 10 | 11 | public FileExtenderResource(String filePath) { 12 | this(new File(filePath)); 13 | } 14 | 15 | public FileExtenderResource(String filePath, String zipPath) { 16 | this(new File(filePath)); 17 | this.filePath = zipPath; 18 | } 19 | 20 | FileExtenderResource(File file) { 21 | this.file = file; 22 | this.filePath = file.getPath(); 23 | } 24 | 25 | @Override 26 | public String getPath() { 27 | return filePath; 28 | } 29 | 30 | @Override 31 | public byte[] getContent() throws IOException { 32 | return Files.readAllBytes(this.file.toPath()); 33 | } 34 | 35 | @Override 36 | public long getLastModified() { 37 | return file.lastModified(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/tracing/ExtenderTracerInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.tracing; 2 | 3 | import io.micrometer.tracing.Tracer; 4 | import io.micrometer.tracing.propagation.Propagator; 5 | import org.apache.http.HttpException; 6 | import org.apache.http.HttpMessage; 7 | import org.apache.http.HttpRequest; 8 | import org.apache.http.HttpRequestInterceptor; 9 | import org.apache.http.protocol.HttpContext; 10 | 11 | import java.io.IOException; 12 | 13 | 14 | public class ExtenderTracerInterceptor implements HttpRequestInterceptor { 15 | 16 | private final Tracer tracer; 17 | private final Propagator propagator; 18 | 19 | public ExtenderTracerInterceptor(Tracer tracer, Propagator propagator) { 20 | this.tracer = tracer; 21 | this.propagator = propagator; 22 | } 23 | 24 | @Override 25 | public void process(HttpRequest request, HttpContext context) throws HttpException, IOException { 26 | if (tracer.currentSpan() != null) { 27 | propagator.inject(tracer.currentSpan().context(), request, HttpMessage::addHeader); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Defold Foundation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /server/manifestmergetool/src/main/resources/PropertyList-1.0.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /server/test-data/pod_specs/UnityAds.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "UnityAds", 3 | "version": "4.14.1", 4 | "license": { 5 | "type": "Unity License", 6 | "file": "LICENSE" 7 | }, 8 | "authors": { 9 | "UnityAds": "itunes@unity3d.com" 10 | }, 11 | "homepage": "https://unity3d.com/services/ads", 12 | "summary": "Monetize your entire player base and reach new audiences with video ads.", 13 | "platforms": { 14 | "ios": "12.0" 15 | }, 16 | "source": { 17 | "http": "https://github.com/Unity-Technologies/unity-ads-ios/releases/download/4.14.1/UnityAds.zip" 18 | }, 19 | "ios": { 20 | "vendored_frameworks": "UnityAds.xcframework" 21 | }, 22 | "resource_bundles": { 23 | "UnityAdsResources": "UnityAds.xcframework/ios-arm64/**/*.{xcprivacy,js}" 24 | }, 25 | "frameworks": [ 26 | "AdSupport", 27 | "AudioToolbox", 28 | "AVFoundation", 29 | "CoreGraphics", 30 | "CoreTelephony", 31 | "Foundation", 32 | "QuartzCore", 33 | "StoreKit", 34 | "SystemConfiguration", 35 | "WebKit", 36 | "UIKit", 37 | "AVFAudio", 38 | "CoreFoundation", 39 | "Network" 40 | ], 41 | "swift_versions": "5.0", 42 | "swift_version": "5.0" 43 | } -------------------------------------------------------------------------------- /server/src/test/java/com/defold/extender/cache/CacheKeyGeneratorTest.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache; 2 | 3 | import com.defold.extender.TestUtils; 4 | 5 | import static org.junit.jupiter.api.Assertions.assertEquals; 6 | 7 | import java.io.File; 8 | import java.io.IOException; 9 | import java.net.URISyntaxException; 10 | 11 | import org.junit.jupiter.api.Test; 12 | 13 | public class CacheKeyGeneratorTest { 14 | 15 | private String generate(final String filename) throws URISyntaxException, IOException { 16 | CacheKeyGenerator cacheKeyGenerator = new CacheKeyGenerator(); 17 | File file = new File(ClassLoader.getSystemResource(filename).toURI()); 18 | return cacheKeyGenerator.generate(file); 19 | } 20 | 21 | @Test 22 | public void generateKeyForFile() throws IOException, URISyntaxException { 23 | assertEquals(TestUtils.CACHE_ENTRIES[0].getKey(), generate("upload/" + TestUtils.CACHE_ENTRIES[0].getPath())); 24 | } 25 | 26 | @Test 27 | public void generateKeyForAnotherFile() throws IOException, URISyntaxException { 28 | assertEquals(TestUtils.CACHE_ENTRIES[1].getKey(), generate("upload/" + TestUtils.CACHE_ENTRIES[1].getPath())); 29 | } 30 | } -------------------------------------------------------------------------------- /server/test-data/xcconfigs/YandexMobileMetrica.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/YandexMobileMetrica 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/YandexMobileMetrica/static" "${PODS_XCFRAMEWORKS_BUILD_DIR}/YandexMobileMetrica/Static/Core" "${PODS_XCFRAMEWORKS_BUILD_DIR}/YandexMobileMetrica/Static/Crashes" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"sqlite3" -l"z" -framework "AdSupport" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony" -framework "Foundation" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/YandexMobileMetrica 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /.idea/runConfigurations/Run_standalone_Extender.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 20 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /server/test-data/xcconfigs/Sentry.xcconfig: -------------------------------------------------------------------------------- 1 | APPLICATION_EXTENSION_API_ONLY = YES 2 | CLANG_CXX_LANGUAGE_STANDARD = c++14 3 | CLANG_CXX_LIBRARY = libc++ 4 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 5 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Sentry 6 | GCC_ENABLE_CPP_EXCEPTIONS = YES 7 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 8 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Sentry" "${PODS_ROOT}/Headers/Public" 9 | OTHER_CFLAGS = $(inherited) -DAPPLICATION_EXTENSION_API_ONLY_$(APPLICATION_EXTENSION_API_ONLY) 10 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" 11 | PODS_BUILD_DIR = ${BUILD_DIR} 12 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 13 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 14 | PODS_ROOT = ${SRCROOT} 15 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Sentry 16 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 17 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 18 | SKIP_INSTALL = YES 19 | SWIFT_INCLUDE_PATHS = $(inherited) ${PODS_TARGET_SRCROOT}/Sources/Sentry/include 20 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 21 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/ExtenderYamlSafeConstructor.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import org.yaml.snakeyaml.LoaderOptions; 4 | import org.yaml.snakeyaml.constructor.Construct; 5 | import org.yaml.snakeyaml.constructor.Constructor; 6 | import org.yaml.snakeyaml.nodes.Tag; 7 | 8 | class ExtenderYamlSafeConstructor extends Constructor { 9 | 10 | public ExtenderYamlSafeConstructor(LoaderOptions loadingConfig) { 11 | super(loadingConfig); 12 | Construct c = this.yamlConstructors.get(null); // ConstructYamlObject 13 | 14 | this.yamlConstructors.put(new Tag(Tag.PREFIX + "com.defold.extender.Configuration"), c); 15 | this.yamlConstructors.put(new Tag(Tag.PREFIX + "com.defold.extender.ManifestConfiguration"), c); 16 | this.yamlConstructors.put(new Tag(Tag.PREFIX + "com.defold.extender.AppManifestConfiguration"), c); 17 | this.yamlConstructors.put(new Tag(Tag.PREFIX + "com.defold.extender.PlatformConfig"), c); 18 | this.yamlConstructors.put(new Tag(Tag.PREFIX + "com.defold.extender.AppManifestPlatformConfig"), c); 19 | this.yamlConstructors.put(new Tag(Tag.PREFIX + "com.defold.extender.ManifestPlatformConfig"), c); 20 | this.yamlConstructors.put(new Tag(Tag.PREFIX + "com.defold.extender.WhitelistConfig"), c); 21 | 22 | this.yamlConstructors.put(null, undefinedConstructor); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/cocoapods/PlatformSet.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.cocoapods; 2 | 3 | import java.util.LinkedHashSet; 4 | import java.util.List; 5 | import java.util.Set; 6 | 7 | public class PlatformSet { 8 | public Set ios = new LinkedHashSet<>(); 9 | public Set osx = new LinkedHashSet<>(); 10 | 11 | public void addAll(PlatformSet v) { 12 | ios.addAll(v.ios); 13 | osx.addAll(v.osx); 14 | } 15 | 16 | public void addAll(List values) { 17 | for (String v : values) { 18 | ios.add(v); 19 | osx.add(v); 20 | } 21 | } 22 | 23 | public void add(String value) { 24 | ios.add(value); 25 | osx.add(value); 26 | } 27 | 28 | public Set get(String platform) { 29 | if (platform.contains("ios")) { 30 | return ios; 31 | } 32 | else if (platform.contains("osx")) { 33 | return osx; 34 | } 35 | return new LinkedHashSet(); 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | StringBuilder sb = new StringBuilder(); 41 | sb.append("ios: " + ios.toString()); 42 | sb.append(" osx: " + osx.toString()); 43 | return sb.toString(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /server/configs/application-test-app.yml: -------------------------------------------------------------------------------- 1 | extender: 2 | instance-type: FRONTEND_ONLY 3 | remote-builder: 4 | enabled: true 5 | platforms: 6 | android-ndk25: 7 | url: http://android-ndk25:9000 8 | instanceId: android-ndk25 9 | alwaysOn: true 10 | emsdk-3165: 11 | url: http://emsdk-3165:9000 12 | instanceId: emsdk-3165 13 | emsdk-406: 14 | url: http://emsdk-406:9000 15 | instanceId: emsdk-406 16 | linux-latest: 17 | url: http://linux:9000 18 | instanceId: linux 19 | linux-arm64-latest: 20 | url: http://linux-arm64:9000 21 | instanceId: linux-arm64 22 | nssdk-1832: 23 | url: http://nssdk-1832:9000 24 | instanceId: nssdk-1832 25 | ps4-12000: 26 | url: http://ps4-12000:9000 27 | instanceId: ps4-12000 28 | ps5-10000: 29 | url: http://ps5-10000:9000 30 | instanceId: ps5-10000 31 | winsdk-2022: 32 | url: http://winsdk-2022:9000 33 | instanceId: winsdk-2022 34 | 35 | logging.pattern.level: "%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]" 36 | -------------------------------------------------------------------------------- /server/configs/application-local-dev-app.yml: -------------------------------------------------------------------------------- 1 | extender: 2 | instance-type: FRONTEND_ONLY 3 | remote-builder: 4 | enabled: true 5 | platforms: 6 | android-ndk25: 7 | url: http://android-ndk25:9000 8 | instanceId: android-ndk25 9 | alwaysOn: true 10 | emsdk-3165: 11 | url: http://emsdk-3165:9000 12 | instanceId: emsdk-3165 13 | emsdk-406: 14 | url: http://emsdk-406:9000 15 | instanceId: emsdk-406 16 | linux-latest: 17 | url: http://linux:9000 18 | instanceId: linux 19 | linux-arm64-latest: 20 | url: http://linux-arm64:9000 21 | instanceId: linux-arm64 22 | nssdk-1832: 23 | url: http://nssdk-1832:9000 24 | instanceId: nssdk-1832 25 | ps4-12000: 26 | url: http://ps4-12000:9000 27 | instanceId: ps4-12000 28 | ps5-10000: 29 | url: http://ps5-10000:9000 30 | instanceId: ps5-10000 31 | winsdk-2022: 32 | url: http://winsdk-2022:9000 33 | instanceId: winsdk-2022 34 | 35 | logging.pattern.level: "%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]" 36 | -------------------------------------------------------------------------------- /server/test-data/xcconfigs/MintegralAdSDK.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MintegralAdSDK 3 | EXCLUDED_ARCHS[sdk=iphonesimulator*] = i386 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/MintegralAdSDK/Fmk" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BannerAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BidNativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/InterstitialVideoAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NewInterstitialAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/RewardVideoAd" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | OTHER_LDFLAGS = $(inherited) -ObjC 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 11 | PODS_ROOT = ${SRCROOT} 12 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MintegralAdSDK 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 15 | SKIP_INSTALL = YES 16 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 17 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/GradleService.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.springframework.stereotype.Service; 9 | 10 | import com.defold.extender.ExtenderBuildState; 11 | import com.defold.extender.ExtenderException; 12 | 13 | import io.micrometer.core.instrument.Gauge; 14 | import io.micrometer.core.instrument.MeterRegistry; 15 | import io.micrometer.core.instrument.binder.BaseUnits; 16 | 17 | @Service 18 | public class GradleService { 19 | private final GradleServiceInterface gradleService; 20 | 21 | public GradleService(GradleServiceInterface service, 22 | MeterRegistry registry) { 23 | gradleService = service; 24 | Gauge.builder("extender.job.gradle.cacheSize", this, GradleService::getCacheSize).baseUnit(BaseUnits.BYTES).register(registry); 25 | } 26 | 27 | public List resolveDependencies(ExtenderBuildState buildState, Map env, List outputFiles) 28 | throws IOException, ExtenderException { 29 | return gradleService.resolveDependencies(buildState, env, outputFiles); 30 | } 31 | 32 | public long getCacheSize() { 33 | try { 34 | return gradleService.getCacheSize(); 35 | } catch (IOException exc) { 36 | return 0; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/tracing/TraceIdInResponseServletFilter.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.tracing; 2 | 3 | import io.micrometer.tracing.Span; 4 | import io.micrometer.tracing.Tracer; 5 | import jakarta.servlet.Filter; 6 | import jakarta.servlet.FilterChain; 7 | import jakarta.servlet.ServletException; 8 | import jakarta.servlet.ServletRequest; 9 | import jakarta.servlet.ServletResponse; 10 | import jakarta.servlet.http.HttpServletResponse; 11 | 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Component; 14 | 15 | import java.io.IOException; 16 | 17 | @Component 18 | public class TraceIdInResponseServletFilter implements Filter { 19 | 20 | public static final String TRACE_ID_HEADER_NAME = "X-TraceId"; 21 | 22 | private final Tracer tracer; 23 | 24 | public TraceIdInResponseServletFilter(@Autowired Tracer tracer) { 25 | this.tracer = tracer; 26 | } 27 | 28 | @Override 29 | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 30 | throws IOException, ServletException { 31 | final Span currentSpan = tracer.currentSpan(); 32 | if (currentSpan != null) { 33 | HttpServletResponse resp = (HttpServletResponse) response; 34 | resp.addHeader(TRACE_ID_HEADER_NAME, currentSpan.context().traceId()); 35 | } 36 | chain.doFilter(request, response); 37 | } 38 | } -------------------------------------------------------------------------------- /server/test-data/pod_specs/PNChartboostSDKAdapter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TPNChartboostSDKAdapter", 3 | "version": "6.4.12", 4 | "summary": "TPNChartboostAdapter used for mediation with the TopOn SDK", 5 | "description": "TopOn SDK for developer", 6 | "homepage": "https://github.com/CocoaPods/Specs/search?o=desc&q=TPNChartboostAdapter&s=indexed", 7 | "authors": { 8 | "topon": "mct-js@toponad.com" 9 | }, 10 | "license": { 11 | "type": "MIT", 12 | "file": "TPNChartboostAdapter-6.4.12/LICENSE" 13 | }, 14 | "platforms": { 15 | "ios": "11.0" 16 | }, 17 | "static_framework": true, 18 | "requires_arc": true, 19 | "pod_target_xcconfig": { 20 | "OTHER_LDFLAGS": [ 21 | "-lObjC" 22 | ], 23 | "VALID_ARCHS": "x86_64 armv7 armv7s arm64" 24 | }, 25 | "source": { 26 | "http": "https://topon-sdk-release.oss-cn-hangzhou.aliyuncs.com/TPN_Release/v6.4.12/iOS/TPN_mediation/AnyThinkChartboostAdapter-6.4.12.zip", 27 | "type": "zip" 28 | }, 29 | "vendored_frameworks": "AnyThinkChartboostAdapter-6.4.12/AnyThinkChartboostAdapter.framework", 30 | "dependencies": { 31 | "TPNiOS": [ 32 | "6.4.12" 33 | ], 34 | "ChartboostSDK": [ 35 | "9.7.0" 36 | ], 37 | "ChartboostMediationSDK": [ 38 | "4.9.0.1" 39 | ], 40 | "ChartboostMediationAdapterChartboost": [ 41 | "4.9.7.0.0" 42 | ] 43 | } 44 | } -------------------------------------------------------------------------------- /server/src/main/resources/template.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net9.0 4 | enable 5 | enable 6 | true 7 | static 8 | Library 9 | true 10 | false 11 | true 12 | True 13 | 14 | 15 | true 16 | false 17 | 18 | 19 | True 20 | True 21 | 22 | $(MSBuildProjectName) 23 | true 24 | false 25 | false 26 | {{BUILDDIR_CS}} 27 | {{BUILDDIR_CS}} 28 | 29 | 30 | {{#PINVOKE}} 31 | 32 | {{/PINVOKE}} 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/utils/FrameworkUtil.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.utils; 2 | 3 | import java.io.File; 4 | import java.util.List; 5 | 6 | import com.defold.extender.ExtenderException; 7 | import com.defold.extender.process.ProcessUtils; 8 | 9 | public class FrameworkUtil { 10 | /** 11 | * Check if a framework is dynamically linked 12 | * Cocoapods (written in Ruby) uses the "macho" gem to do the same thing: 13 | * https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/xcode/linkage_analyzer.rb#L16 14 | * https://github.com/Homebrew/ruby-macho/ 15 | * @param framework The framework to check 16 | * @return true if dynamically linked 17 | */ 18 | public static boolean isDynamicallyLinked(File framework) throws ExtenderException { 19 | String filename = framework.getName(); 20 | // static library 21 | if (filename.endsWith(".a")) { 22 | return false; 23 | } 24 | if (framework.isDirectory() && filename.endsWith(".framework")) { 25 | String frameworkName = filename.replace(".framework", ""); 26 | File frameworkBinary = new File(framework, frameworkName); 27 | String output = ProcessUtils.execCommand(List.of( 28 | "file", 29 | frameworkBinary.getAbsolutePath()), null, null); 30 | if (output.contains("dynamically linked shared library")) { 31 | return true; 32 | } 33 | } 34 | return false; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /server/src/test/java/com/defold/extender/cache/info/CacheInfoFileWriterTest.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache.info; 2 | 3 | import com.defold.extender.cache.CacheEntry; 4 | 5 | import static org.junit.jupiter.api.Assertions.assertEquals; 6 | 7 | import java.io.ByteArrayInputStream; 8 | import java.io.ByteArrayOutputStream; 9 | import java.util.Arrays; 10 | 11 | import org.junit.jupiter.api.Test; 12 | 13 | public class CacheInfoFileWriterTest { 14 | 15 | private static final CacheEntry[] ENTRIES = { 16 | new CacheEntry("675fef8ef8", "foo/bar.jar", true), 17 | new CacheEntry("234bc895fe73", "dir/asdf.zip", false) 18 | }; 19 | 20 | private static final String JSON = "{\"version\":1,\"hashType\":\"sha256\",\"files\":[{\"key\":\"675fef8ef8\",\"path\":\"foo/bar.jar\",\"cached\":true}," + 21 | "{\"key\":\"234bc895fe73\",\"path\":\"dir/asdf.zip\",\"cached\":false}]}"; 22 | 23 | @Test 24 | public void write() throws Exception { 25 | CacheInfoFileWriter cacheInfoFileWriter = new CacheInfoFileWriter(); 26 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 27 | 28 | cacheInfoFileWriter.write(1, "sha256", Arrays.asList(ENTRIES), outputStream); 29 | 30 | ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray()); 31 | byte[] buffer = new byte[inputStream.available()]; 32 | inputStream.read(buffer, 0, inputStream.available()); 33 | 34 | assertEquals(JSON, new String(buffer)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /server/test-data/ext/lib/js-web/library_dummy.js: -------------------------------------------------------------------------------- 1 | 2 | // https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html 3 | 4 | var LibraryMyTest = { 5 | 6 | // This can be accessed from the bootstrap code in the .html file 7 | $MYTESTLIBRARY: { 8 | _data: '', 9 | _cstr: null, 10 | 11 | GetTestData : function() { 12 | if (typeof window !== 'undefined') { 13 | return MYTESTLIBRARY._data; 14 | } 15 | else { 16 | return ''; 17 | } 18 | }, 19 | 20 | SetTestData : function(data) { 21 | if (typeof window !== 'undefined') { 22 | MYTESTLIBRARY._data = data; 23 | } 24 | }, 25 | }, 26 | 27 | // These can be called from within the extension, in C++ 28 | testGetUserData: function() { 29 | if (null == MYTESTLIBRARY._cstr) { 30 | var str = MYTESTLIBRARY.GetTestData(); // get the data from java script 31 | if (str != '') { 32 | MYTESTLIBRARY._cstr = stringToNewUTF8(str); // allocate C++ memory to store it in 33 | } 34 | } 35 | return MYTESTLIBRARY._cstr; 36 | }, 37 | 38 | testClearUserData: function() { 39 | MYTESTLIBRARY._data = ''; 40 | _free(MYTESTLIBRARY._cstr); 41 | MYTESTLIBRARY._cstr = null; 42 | } 43 | } 44 | 45 | autoAddDeps(LibraryMyTest, '$MYTESTLIBRARY'); 46 | addToLibrary(LibraryMyTest); -------------------------------------------------------------------------------- /client/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | } 4 | 5 | java { 6 | sourceCompatibility = JavaVersion.VERSION_1_8 7 | targetCompatibility = JavaVersion.VERSION_1_8 8 | } 9 | 10 | repositories { 11 | mavenCentral() 12 | } 13 | 14 | ext { 15 | clientVersion = findProperty('clientVersion') ?: '0.5.0' 16 | } 17 | 18 | if (project.hasProperty('publishToGar')) { 19 | apply plugin: 'com.google.cloud.artifactregistry.gradle-plugin' 20 | publishing { 21 | publications { 22 | extenderClient(MavenPublication) { 23 | artifact jar 24 | groupId = 'com.defold.extender' 25 | artifactId = 'client' 26 | version = project.ext.clientVersion 27 | } 28 | } 29 | } 30 | } 31 | 32 | jar { 33 | archiveBaseName = 'extender-client' 34 | version = project.ext.clientVersion 35 | } 36 | 37 | dependencies { 38 | implementation('org.apache.httpcomponents:httpclient:4.5.14') 39 | implementation('org.apache.httpcomponents:httpmime:4.5.14') 40 | implementation('com.googlecode.json-simple:json-simple:1.1.1') { 41 | exclude module: 'junit' 42 | } 43 | testImplementation('commons-io:commons-io:2.20.0') 44 | testImplementation("org.mockito:mockito-core:5.+") 45 | testImplementation('org.junit.jupiter:junit-jupiter-engine:5.13.4') 46 | testImplementation('org.junit.jupiter:junit-jupiter-params:5.13.4') 47 | testImplementation('org.apache.james:apache-mime4j:0.8.13') 48 | } 49 | 50 | test { 51 | useJUnitPlatform() 52 | } 53 | -------------------------------------------------------------------------------- /server/src/main/resources/template.build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:{{gradle-plugin-version}}' 8 | } 9 | } 10 | 11 | allprojects { 12 | repositories { 13 | google() 14 | mavenCentral() 15 | } 16 | } 17 | 18 | apply plugin: 'com.android.application' 19 | 20 | android { 21 | compileSdkVersion {{compile-sdk-version}} 22 | 23 | compileOptions { 24 | sourceCompatibility = JavaVersion.VERSION_1_8 25 | targetCompatibility = JavaVersion.VERSION_1_8 26 | } 27 | 28 | namespace = "com.defold.defold" 29 | } 30 | 31 | java { 32 | toolchain { 33 | languageVersion.set(JavaLanguageVersion.of(8)) 34 | } 35 | } 36 | 37 | {{#gradle-files}} 38 | apply from: "{{{.}}}" 39 | {{/gradle-files}} 40 | 41 | dependencyLocking { 42 | lockAllConfigurations() 43 | lockFile = file("$projectDir/build/gradle.lockfile") 44 | } 45 | 46 | task downloadDependencies { 47 | doLast { 48 | project.configurations.releaseRuntimeClasspath.getResolvedConfiguration().getResolvedArtifacts().each { 49 | println "PATH: " + it.file + \ 50 | " EXTENSION: " + it.extension + \ 51 | " TYPE: " + it.type + \ 52 | " MODULE_GROUP: " + it.moduleVersion.id.group + \ 53 | " MODULE_NAME: " + it.moduleVersion.id.name + \ 54 | " MODULE_VERSION: " + it.moduleVersion.id.version 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /server/docker/common-services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | test_builder: 3 | platform: linux/amd64 4 | volumes: 5 | - ./../app/:/app/:ro 6 | - ./../configs:/etc/defold/extender:ro 7 | entrypoint: ["java","-Xmx4g","-XX:MaxDirectMemorySize=2g","-jar","/app/extender.jar"] 8 | user: extender 9 | environment: 10 | - EXAMPLE_VAR=1 11 | healthcheck: 12 | # Extender's port is hardcoded here. 13 | test: wget --no-verbose --tries=1 --spider http://localhost:9000/actuator/health 14 | interval: 10s 15 | timeout: 2s 16 | retries: 10 17 | start_period: 5s 18 | common_builder: 19 | platform: linux/amd64 20 | volumes: 21 | - ./../app/:/app/:ro 22 | - ./../app/:/etc/extender/apps/:ro 23 | - ./../configs:/etc/defold/extender:ro 24 | - ${DYNAMO_HOME:-./../app/dummy}:/dynamo_home 25 | entrypoint: ["java","-Xmx4g","-XX:MaxDirectMemorySize=2g","-Dorg.eclipse.jetty.server.Request.maxFormKeys=1500","-jar","/app/extender.jar"] 26 | user: extender 27 | environment: 28 | - DYNAMO_HOME${DYNAMO_HOME:+=/dynamo_home} 29 | - DM_DEBUG_COMMANDS 30 | - DM_DEBUG_DISABLE_PROGUARD 31 | - DM_DEBUG_JOB_FOLDER 32 | - DM_DEBUG_KEEP_JOB_FOLDER 33 | - DM_DEBUG_JOB_UPLOAD 34 | remote_builder: 35 | extends: common_builder 36 | command: ["--spring.config.location=classpath:./,file:/etc/defold/extender/", "--spring.profiles.active=local-dev${STRUCTURED_LOGGING+,logging}"] 37 | test_remote_builder: 38 | extends: test_builder 39 | command: ["--spring.config.location=classpath:./,file:/etc/defold/extender/", "--spring.profiles.active=local-dev"] -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/cache/CacheKeyGenerator.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import java.io.BufferedInputStream; 6 | import java.io.File; 7 | import java.io.FileInputStream; 8 | import java.io.IOException; 9 | import java.math.BigInteger; 10 | import java.security.MessageDigest; 11 | import java.security.NoSuchAlgorithmException; 12 | 13 | @Service 14 | public class CacheKeyGenerator { 15 | 16 | private static final String SHA256 = "SHA-256"; 17 | 18 | public String generate(File file) throws IOException { 19 | int count; 20 | 21 | MessageDigest digest = getDigest(); 22 | 23 | try(BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file))) { 24 | byte[] buffer = new byte[8192]; 25 | while ((count = bis.read(buffer)) > 0) { 26 | digest.update(buffer, 0, count); 27 | } 28 | } 29 | 30 | // Note: If you change this, the format of the cache is changed 31 | // See: ./client/src/main/java/com/defold/extender/client/ExtenderClient.java (which is then bundled in bob.jar) 32 | // and native_extensions.clj in the editor for the equivalent parts 33 | byte[] bytes = digest.digest(); 34 | return new BigInteger(1, bytes).toString(16); 35 | } 36 | 37 | private MessageDigest getDigest() { 38 | try { 39 | return MessageDigest.getInstance(SHA256); 40 | } catch (NoSuchAlgorithmException e) { 41 | throw new IllegalStateException("Algorithm SHA-256 is not supported", e); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/process/ProcessUtils.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.process; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.Arrays; 6 | import java.util.List; 7 | import java.util.Map; 8 | import java.util.stream.Collectors; 9 | 10 | import com.defold.extender.ExtenderException; 11 | 12 | public class ProcessUtils { 13 | public static String execCommand(String command) throws ExtenderException { 14 | return execCommand(command, null); 15 | } 16 | 17 | public static String execCommand(String command, File cwd) throws ExtenderException { 18 | return execCommand(command, cwd, null); 19 | } 20 | 21 | public static String execCommand(String command, File cwd, Map env) throws ExtenderException { 22 | List args = Arrays.stream(command.split(" ")) 23 | .filter(s -> !s.isEmpty()) 24 | .collect(Collectors.toList()); 25 | return execCommand(args, cwd, env); 26 | } 27 | 28 | public static String execCommand(List args, File cwd, Map env) throws ExtenderException { 29 | ProcessExecutor pe = new ProcessExecutor(); 30 | 31 | if (cwd != null) { 32 | pe.setCwd(cwd); 33 | } 34 | if (env != null) { 35 | pe.putEnv(env); 36 | } 37 | 38 | try { 39 | if (pe.execute(args) != 0) { 40 | throw new ExtenderException(pe.getOutput()); 41 | } 42 | } catch (IOException | InterruptedException e) { 43 | throw new ExtenderException(e, pe.getOutput()); 44 | } 45 | 46 | return pe.getOutput(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /server/test-data/jars/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script is for regenerating Dummy.jar, and VeryLarge1 and VeryLarge2.jar 4 | # Usage: cd to this directory and run this script, and it should regenerate those files for you. 5 | 6 | if [ "$ANDROID_HOME" == "" ]; then 7 | echo "No ANDROID_HOME environment variable set!" 8 | exit 1 9 | fi 10 | 11 | BUILD=./build 12 | 13 | PACKAGE_NAME=com/defold/dummy 14 | 15 | ANDROID_SDK_VERSION=33 16 | ANDROID_JAR=${ANDROID_HOME}/platforms/android-${ANDROID_SDK_VERSION}/android.jar 17 | 18 | mkdir -p $BUILD 19 | 20 | # Dummy.jar 21 | javac -source 1.8 -target 1.8 -cp . com/defold/dummy/Dummy.java 22 | jar -cvf ../ext/lib/android/Dummy.jar com 23 | 24 | # VeryLarge.jar 25 | 26 | array=( VeryLarge1 VeryLarge2 ) 27 | for NAME in "${array[@]}" 28 | do 29 | echo "Generating $NAME.java..." 30 | mkdir -p tmp/com/defold/multidex 31 | pushd tmp 32 | 33 | VERYLARGE_JAVA=com/defold/multidex/$NAME.java 34 | 35 | echo "package com.defold.multidex;" > $VERYLARGE_JAVA 36 | echo "public class ${NAME} {" >> $VERYLARGE_JAVA 37 | 38 | COUNTER=0 39 | while [ $COUNTER -lt 40000 ]; do 40 | #echo The counter is $COUNTER 41 | echo "static public int Function${COUNTER}() { return ${COUNTER}; }" >> $VERYLARGE_JAVA 42 | let COUNTER=COUNTER+1 43 | done 44 | 45 | echo "}" >> $VERYLARGE_JAVA 46 | 47 | echo "done." 48 | 49 | javac -source 1.8 -target 1.8 -cp . $VERYLARGE_JAVA 50 | rm $VERYLARGE_JAVA 51 | jar -cvf ../../ext/lib/android/$NAME.jar com 52 | 53 | popd 54 | rm -rf ./tmp 55 | done 56 | 57 | # meta-inf.jar 58 | javac -cp . io/foo/dummy/FooDummy.java 59 | jar -cvf ../ext/lib/android/meta-inf.jar io META-INF 60 | -------------------------------------------------------------------------------- /server/docker/Dockerfile.emsdk.406-env: -------------------------------------------------------------------------------- 1 | FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.5.0 2 | 3 | ENV EMSCRIPTEN_SDK_4_0_6=${PLATFORMSDK_DIR}/emsdk-4.0.6 4 | ENV EMSCRIPTEN_HOME_4_0_6=${EMSCRIPTEN_SDK_4_0_6} 5 | ENV EMSCRIPTEN_CACHE_4_0_6=/var/extender/emcache_4_0_6 6 | ENV EMSCRIPTEN_CONFIG_4_0_6=${EMSCRIPTEN_HOME_4_0_6}/.emscripten 7 | ENV EMSCRIPTEN_PYTHON_4_0_6=/usr/bin/python3.10 8 | ENV EMSCRIPTEN_BIN_4_0_6=${EMSCRIPTEN_HOME_4_0_6}/upstream/emscripten 9 | ENV EMSCRIPTEN_PATH_4_0_6=${EMSCRIPTEN_HOME_4_0_6}:${EMSCRIPTEN_HOME_4_0_6}/upstream/bin:${EMSCRIPTEN_HOME_4_0_6}/node/20.18.0_64bit/bin:${EMSCRIPTEN_BIN_4_0_6} 10 | 11 | RUN --mount=type=secret,id=DM_PACKAGES_URL,required=true \ 12 | mkdir ${EMSCRIPTEN_SDK_4_0_6} && \ 13 | wget -q -O - $(cat /run/secrets/DM_PACKAGES_URL)/emsdk-4.0.6-x86_64-linux.tar.gz | tar xz -C ${EMSCRIPTEN_SDK_4_0_6} --strip-components=1 14 | 15 | RUN \ 16 | ${EMSCRIPTEN_HOME_4_0_6}/emsdk activate sdk-4.0.6-64bit && \ 17 | EM_CONFIG=$EMSCRIPTEN_CONFIG_4_0_6 EM_CACHE=${EMSCRIPTEN_CACHE_4_0_6} python3 ${EMSCRIPTEN_BIN_4_0_6}/embuilder.py build SYSTEM MINIMAL && \ 18 | chmod -R 755 ${EMSCRIPTEN_HOME_4_0_6} && \ 19 | chown -R extender: ${EMSCRIPTEN_CACHE_4_0_6} 20 | 21 | 22 | # We use the same temp directory for both versions. 23 | ENV EMSCRIPTEN_TEMP_DIR=/var/extender/ems_temp 24 | RUN mkdir -p ${EMSCRIPTEN_TEMP_DIR} 25 | RUN chmod -R 755 ${EMSCRIPTEN_TEMP_DIR} && chown extender: ${EMSCRIPTEN_TEMP_DIR} 26 | # The "sed" command below removes the /TEMP_DIR line from the generated configs 27 | # We replace it with a folder of our own 28 | RUN sed '/TEMP_DIR =/d' ${EMSCRIPTEN_CONFIG_4_0_6} && \ 29 | echo TEMP_DIR = \'${EMSCRIPTEN_TEMP_DIR}\' >> ${EMSCRIPTEN_CONFIG_4_0_6} 30 | -------------------------------------------------------------------------------- /server/test-data/pod_specs/TPNiOS.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TPNiOS", 3 | "version": "1.0.0", 4 | "summary": "A short description of TPN SDK for iOS.", 5 | "description": "TopOn SDK for developer", 6 | "homepage": "https://github.com/TPNteam/sdk_ios_cocoapod", 7 | "license": { 8 | "type": "MIT", 9 | "file": "TPNiOS/LICENSE" 10 | }, 11 | "authors": { 12 | "topon": "developer@toponad.com" 13 | }, 14 | "source": { 15 | "http": "https://topon-sdk-release.oss-cn-hangzhou.aliyuncs.com/TPN_Release/v1.0.0/iOS/TPN_mediation/AnyThinkiOS.zip" 16 | }, 17 | "platforms": { 18 | "ios": "9.0" 19 | }, 20 | "static_framework": true, 21 | "requires_arc": true, 22 | "frameworks": [ 23 | "SystemConfiguration", 24 | "CoreGraphics", 25 | "Foundation", 26 | "UIKit" 27 | ], 28 | "pod_target_xcconfig": { 29 | "VALID_ARCHS": "arm64 arm64e armv7 armv7s x86_64", 30 | "VALID_ARCHS[sdk=iphoneos*]": "arm64 arm64e armv7 armv7s", 31 | "VALID_ARCHS[sdk=iphonesimulator*]": "arm64 arm64e x86_64" 32 | }, 33 | "libraries": [ 34 | "c++", 35 | "z", 36 | "sqlite3", 37 | "xml2", 38 | "resolv" 39 | ], 40 | "default_subspecs": "TPNSDK", 41 | "swift_versions": "5.0", 42 | "subspecs": [ 43 | { 44 | "name": "TPNSDK", 45 | "platforms": { 46 | "ios": "9.0" 47 | }, 48 | "vendored_frameworks": [ 49 | "core/AnyThink{Banner,Splash,RewardedVideo,Interstitial,Native,MediaVideo}.xcframework", 50 | "core/AnyThinkSDK.xcframework" 51 | ], 52 | "resources": "core/AnyThinkSDK.bundle" 53 | } 54 | ], 55 | "swift_version": "5.0" 56 | } 57 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/TemplateExecutor.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import com.defold.extender.log.Markers; 4 | import com.samskivert.mustache.Mustache; 5 | 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | public class TemplateExecutor { 14 | private static final Logger LOGGER = LoggerFactory.getLogger(TemplateExecutor.class); 15 | 16 | public String execute(String template, Map context) { 17 | try { 18 | String result = Mustache.compiler().compile(template).execute(context); 19 | while (!result.equals(template)) { 20 | template = result; 21 | result = Mustache.compiler().compile(template).execute(context); 22 | } 23 | return result; 24 | } catch (Exception e) { 25 | LOGGER.error(Markers.COMPILATION_ERROR, String.format("Failed to substitute string '%s'", (String)template)); 26 | ExtenderUtil.debugPrint(context, 0); 27 | throw e; 28 | } 29 | } 30 | 31 | public List execute(List templates, Map context) { 32 | List out = new ArrayList<>(); 33 | for (String template : templates) { 34 | try { 35 | out.add(this.execute(template, context)); 36 | } catch (Exception e) { 37 | LOGGER.error(Markers.COMPILATION_ERROR, String.format("Failed to substitute string in list [..., '%s', ...]", (String)template)); 38 | ExtenderUtil.debugPrint(context, 0); 39 | throw e; 40 | } 41 | } 42 | return out; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /server/docker/Dockerfile.emsdk.3155-env: -------------------------------------------------------------------------------- 1 | FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.5.0 2 | 3 | ENV EMSCRIPTEN_SDK_3_1_55=${PLATFORMSDK_DIR}/emsdk-3.1.55 4 | ENV EMSCRIPTEN_HOME_3_1_55=${EMSCRIPTEN_SDK_3_1_55} 5 | ENV EMSCRIPTEN_CACHE_3_1_55=/var/extender/emcache_3_1_55 6 | ENV EMSCRIPTEN_CONFIG_3_1_55=${EMSCRIPTEN_HOME_3_1_55}/.emscripten 7 | ENV EMSCRIPTEN_PYTHON_3_1_55=/usr/bin/python3.10 8 | ENV EMSCRIPTEN_BIN_3_1_55=${EMSCRIPTEN_HOME_3_1_55}/upstream/emscripten 9 | ENV EMSCRIPTEN_PATH_3_1_55=${EMSCRIPTEN_HOME_3_1_55}:${EMSCRIPTEN_HOME_3_1_55}/upstream/bin:${EMSCRIPTEN_HOME_3_1_55}/node/16.20.0_64bit/bin:${EMSCRIPTEN_BIN_3_1_55} 10 | 11 | RUN --mount=type=secret,id=DM_PACKAGES_URL,required=true \ 12 | mkdir ${EMSCRIPTEN_SDK_3_1_55} && \ 13 | wget -q -O - $(cat /run/secrets/DM_PACKAGES_URL)/emsdk-3.1.55-x86_64-linux.tar.gz | tar xz -C ${EMSCRIPTEN_SDK_3_1_55} --strip-components=1 14 | 15 | RUN \ 16 | ${EMSCRIPTEN_HOME_3_1_55}/emsdk activate sdk-3.1.55-64bit && \ 17 | EM_CONFIG=$EMSCRIPTEN_CONFIG_3_1_55 EM_CACHE=${EMSCRIPTEN_CACHE_3_1_55} python3 ${EMSCRIPTEN_BIN_3_1_55}/embuilder.py build SYSTEM MINIMAL && \ 18 | chmod -R 755 ${EMSCRIPTEN_HOME_3_1_55} && \ 19 | chown -R extender: ${EMSCRIPTEN_CACHE_3_1_55} 20 | 21 | 22 | # We use the same temp directory for both versions. 23 | ENV EMSCRIPTEN_TEMP_DIR=/var/extender/ems_temp 24 | RUN mkdir -p ${EMSCRIPTEN_TEMP_DIR} 25 | RUN chmod -R 755 ${EMSCRIPTEN_TEMP_DIR} && chown extender: ${EMSCRIPTEN_TEMP_DIR} 26 | # The "sed" command below removes the /TEMP_DIR line from the generated configs 27 | # We replace it with a folder of our own 28 | RUN sed '/TEMP_DIR =/d' ${EMSCRIPTEN_CONFIG_3_1_55} && \ 29 | echo TEMP_DIR = \'${EMSCRIPTEN_TEMP_DIR}\' >> ${EMSCRIPTEN_CONFIG_3_1_55} 30 | -------------------------------------------------------------------------------- /server/docker/Dockerfile.emsdk.3165-env: -------------------------------------------------------------------------------- 1 | FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.5.0 2 | 3 | ENV EMSCRIPTEN_SDK_3_1_65=${PLATFORMSDK_DIR}/emsdk-3.1.65 4 | ENV EMSCRIPTEN_HOME_3_1_65=${EMSCRIPTEN_SDK_3_1_65} 5 | ENV EMSCRIPTEN_CACHE_3_1_65=/var/extender/emcache_3_1_65 6 | ENV EMSCRIPTEN_CONFIG_3_1_65=${EMSCRIPTEN_HOME_3_1_65}/.emscripten 7 | ENV EMSCRIPTEN_PYTHON_3_1_65=/usr/bin/python3.10 8 | ENV EMSCRIPTEN_BIN_3_1_65=${EMSCRIPTEN_HOME_3_1_65}/upstream/emscripten 9 | ENV EMSCRIPTEN_PATH_3_1_65=${EMSCRIPTEN_HOME_3_1_65}:${EMSCRIPTEN_HOME_3_1_65}/upstream/bin:${EMSCRIPTEN_HOME_3_1_65}/node/16.20.0_64bit/bin:${EMSCRIPTEN_BIN_3_1_65} 10 | 11 | RUN --mount=type=secret,id=DM_PACKAGES_URL,required=true \ 12 | mkdir ${EMSCRIPTEN_SDK_3_1_65} && \ 13 | wget -q -O - $(cat /run/secrets/DM_PACKAGES_URL)/emsdk-3.1.65-x86_64-linux.tar.gz | tar xz -C ${EMSCRIPTEN_SDK_3_1_65} --strip-components=1 14 | 15 | RUN \ 16 | ${EMSCRIPTEN_HOME_3_1_65}/emsdk activate sdk-3.1.65-64bit && \ 17 | EM_CONFIG=$EMSCRIPTEN_CONFIG_3_1_65 EM_CACHE=${EMSCRIPTEN_CACHE_3_1_65} python3 ${EMSCRIPTEN_BIN_3_1_65}/embuilder.py build SYSTEM MINIMAL && \ 18 | chmod -R 755 ${EMSCRIPTEN_HOME_3_1_65} && \ 19 | chown -R extender: ${EMSCRIPTEN_CACHE_3_1_65} 20 | 21 | 22 | # We use the same temp directory for both versions. 23 | ENV EMSCRIPTEN_TEMP_DIR=/var/extender/ems_temp 24 | RUN mkdir -p ${EMSCRIPTEN_TEMP_DIR} 25 | RUN chmod -R 755 ${EMSCRIPTEN_TEMP_DIR} && chown extender: ${EMSCRIPTEN_TEMP_DIR} 26 | # The "sed" command below removes the /TEMP_DIR line from the generated configs 27 | # We replace it with a folder of our own 28 | RUN sed '/TEMP_DIR =/d' ${EMSCRIPTEN_CONFIG_3_1_65} && \ 29 | echo TEMP_DIR = \'${EMSCRIPTEN_TEMP_DIR}\' >> ${EMSCRIPTEN_CONFIG_3_1_65} 30 | -------------------------------------------------------------------------------- /server/src/test/java/com/defold/extender/TestUtils.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.File; 5 | import java.io.FileReader; 6 | import java.io.IOException; 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | import com.defold.extender.cache.CacheEntry; 11 | 12 | public class TestUtils { 13 | public static final CacheEntry[] MOCK_CACHE_ENTRIES = { 14 | // Generated by "printf path/to/file1 | shasum -a256 -b" 15 | new CacheEntry("2f54e02440ff496294bec7192ade9d1aadc5ac2ce7f9e5642b2ade643a07df6c", "path/to/file1", true), 16 | new CacheEntry("bdac6b0b7f6f4a0c6f11c4713ff28dc29fa0f44c5c663a52833b2b562d67be34", "another/path/to/file2", true), 17 | new CacheEntry("75f51dedab2aa7c827f700e638b068483aff503114073efca509a1c88680a4ff", "last/path/for/file3", true) 18 | }; 19 | 20 | public static final CacheEntry[] CACHE_ENTRIES = { 21 | new CacheEntry("2d8c2f6d978ca21712b5f6de36c9d31fa8e96a4fa5d8ff8b0188dfb9e7c171bb", "dir/test1.txt", true), 22 | new CacheEntry("7f3b61aeb34a8ea15c675ffddaa6af6a6fbdd031ed9786dcb2b35b351a132b31", "dir2/test2.txt", true) 23 | }; 24 | 25 | public static Map envFileToMap(File inputFile) { 26 | Map result = new HashMap<>(); 27 | try (BufferedReader reader = new BufferedReader(new FileReader(inputFile))) { 28 | String line = reader.readLine(); 29 | while (line != null) { 30 | String[] splitted = line.split("="); 31 | result.put(splitted[0], splitted[1]); 32 | line = reader.readLine(); 33 | } 34 | reader.close(); 35 | } catch (IOException e) { 36 | e.printStackTrace(); 37 | } 38 | 39 | return result; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /server/test-data/build-libs.sh: -------------------------------------------------------------------------------- 1 | 2 | # How to build on Windows 3 | # * Make a shared directory between OSX/Win32 for test-data in Parallels Desktop 4 | # * On the windows machine, open an msys terminal 5 | # * Change directory to the new drive (E.g. X: "cd x:") which was mounted for you by Parallels Desktop 6 | # * Run "sh build-libs.sh" 7 | # All files should be named and copied automatically by this script 8 | 9 | 10 | source ./compile.sh 11 | 12 | # Find all .cpp files in a folder and make a lib of each of them 13 | function CompileLibsToExtension { 14 | local dir=$1 15 | local extension=$2 16 | local lib_type=$3 17 | 18 | for file in $dir/*.cpp 19 | do 20 | local name=$(basename $file) 21 | name="${name%.*}" 22 | echo $name $file $lib_type 23 | if [ "$lib_type" == "dynamic" ]; then 24 | CompileDynamic $name $file $extension 25 | else 26 | Compile $name $file $extension 27 | fi 28 | done 29 | } 30 | 31 | function Copy { 32 | mkdir -p $(dirname test-data/$2) 33 | cp -v test-data/$1 test-data/$2 34 | } 35 | 36 | 37 | CompileLibsToExtension enginelibs engineext/lib static 38 | 39 | # copy these into the "a" sdk 40 | mkdir -p sdk/a/defoldsdk/lib 41 | cp -v -r engineext/lib sdk/a/defoldsdk/ 42 | rm -rf ./engineext 43 | 44 | # The sdk's has different naming 45 | mv sdk/a/defoldsdk/lib/x86_64-osx sdk/a/defoldsdk/lib/x86_64-macos 46 | 47 | # Need these folders as well (empty is fine) 48 | mkdir -p sdk/a/defoldsdk/ext/lib/darwin 49 | mkdir -p sdk/a/defoldsdk/ext/lib/x86_64-macos 50 | 51 | CompileLibsToExtension alib ext/lib static 52 | CompileLibsToExtension alib ext2/lib static 53 | CompileLibsToExtension blib ext2/lib static 54 | CompileLibsToExtension stdlib ext_std/lib static 55 | 56 | CompileLibsToExtension dynamic_specific1 ext_dyn_libs/lib dynamic 57 | CompileLibsToExtension dynamic_specific2 ext_dyn_libs2/lib dynamic 58 | 59 | (cd testproject_appmanifest && ./build.sh) 60 | 61 | -------------------------------------------------------------------------------- /server/test-data/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/cocoapods/LanguageSet.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.cocoapods; 2 | 3 | import java.util.ArrayList; 4 | import java.util.LinkedHashSet; 5 | import java.util.List; 6 | import java.util.Set; 7 | 8 | public class LanguageSet { 9 | public Set c = new LinkedHashSet<>(); 10 | public Set cpp = new LinkedHashSet<>(); 11 | public Set objc = new LinkedHashSet<>(); 12 | public Set objcpp = new LinkedHashSet<>(); 13 | public List swift = new ArrayList<>(); 14 | 15 | public LanguageSet() {} 16 | 17 | public LanguageSet(LanguageSet other) { 18 | this.c.addAll(other.c); 19 | this.cpp.addAll(other.cpp); 20 | this.objc.addAll(other.objc); 21 | this.objcpp.addAll(other.objcpp); 22 | this.swift.addAll(other.swift); 23 | } 24 | 25 | public void add(String value) { 26 | c.add(value); 27 | cpp.add(value); 28 | objc.add(value); 29 | objcpp.add(value); 30 | } 31 | 32 | public void addAll(List values) { 33 | for (String v : values) { 34 | add(v); 35 | } 36 | } 37 | 38 | public void addAll(LanguageSet set) { 39 | c.addAll(set.c); 40 | cpp.addAll(set.cpp); 41 | objc.addAll(set.objc); 42 | objcpp.addAll(set.objcpp); 43 | swift.addAll(set.swift); 44 | } 45 | 46 | public void remove(String value) { 47 | c.remove(value); 48 | cpp.remove(value); 49 | objc.remove(value); 50 | objcpp.remove(value); 51 | } 52 | 53 | @Override 54 | public String toString() { 55 | StringBuilder sb = new StringBuilder(); 56 | sb.append("c: " + c); 57 | sb.append(" cpp: " + cpp); 58 | sb.append(" objc: " + objc); 59 | sb.append(" objcpp: " + objcpp); 60 | return sb.toString(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/TreePrinter.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.lang.StringBuilder; 4 | import java.io.File; 5 | 6 | public class TreePrinter { 7 | 8 | /** 9 | * Pretty print the directory tree and its file names. 10 | * https://stackoverflow.com/a/13130974/1266551 11 | * 12 | * @param folder 13 | * @return 14 | */ 15 | public static String printDirectoryTree(File folder) { 16 | if (!folder.isDirectory()) { 17 | throw new IllegalArgumentException("folder is not a Directory"); 18 | } 19 | int indent = 0; 20 | StringBuilder sb = new StringBuilder(); 21 | printDirectoryTree(folder, indent, sb); 22 | return sb.toString(); 23 | } 24 | 25 | private static void printDirectoryTree(File folder, int indent, StringBuilder sb) { 26 | if (!folder.isDirectory()) { 27 | throw new IllegalArgumentException("folder is not a Directory"); 28 | } 29 | sb.append(getIndentString(indent)); 30 | sb.append("+--"); 31 | sb.append(folder.getName()); 32 | sb.append("/"); 33 | sb.append("\n"); 34 | for (File file : folder.listFiles()) { 35 | if (file.isDirectory()) { 36 | printDirectoryTree(file, indent + 1, sb); 37 | } else { 38 | printFile(file, indent + 1, sb); 39 | } 40 | } 41 | 42 | } 43 | 44 | private static void printFile(File file, int indent, StringBuilder sb) { 45 | sb.append(getIndentString(indent)); 46 | sb.append("+--"); 47 | sb.append(file.getName()); 48 | sb.append("\n"); 49 | } 50 | 51 | private static String getIndentString(int indent) { 52 | StringBuilder sb = new StringBuilder(); 53 | for (int i = 0; i < indent; i++) { 54 | sb.append("| "); 55 | } 56 | return sb.toString(); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/data/DefoldSdk.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.data; 2 | 3 | import java.io.File; 4 | import java.util.concurrent.atomic.AtomicBoolean; 5 | 6 | import com.defold.extender.services.DefoldSdkService; 7 | 8 | public class DefoldSdk implements AutoCloseable { 9 | private File sdkDir; 10 | private String sdkHash; 11 | private DefoldSdkService sdkService; 12 | private boolean isVerified = false; 13 | private AtomicBoolean isUsed = new AtomicBoolean(true); 14 | 15 | public DefoldSdk(File sdkDir, String sdkHash, DefoldSdkService sdkService) { 16 | this.sdkDir = sdkDir; 17 | this.sdkHash = sdkHash; 18 | this.sdkService = sdkService; 19 | 20 | this.sdkService.acquireSdk(sdkHash); 21 | } 22 | 23 | public static DefoldSdk copyOf(DefoldSdk sdk) { 24 | DefoldSdk copy = new DefoldSdk(sdk.sdkDir, sdk.sdkHash, sdk.sdkService); 25 | copy.setVerified(sdk.isVerified); 26 | return copy; 27 | } 28 | 29 | public boolean isValid() { 30 | return this.isVerified && this.sdkDir != null && this.sdkDir.exists(); 31 | } 32 | 33 | public File toFile() { 34 | return this.sdkDir; 35 | } 36 | 37 | public String getHash() { 38 | return this.sdkHash; 39 | } 40 | 41 | public void setVerified(boolean isValid) { 42 | this.isVerified = isValid; 43 | } 44 | 45 | public boolean isVerified() { 46 | return this.isVerified; 47 | } 48 | 49 | @Override 50 | public String toString() { 51 | return String.format("Sdk %s at %s", this.sdkHash, this.sdkDir.toString()); 52 | } 53 | 54 | @Override 55 | public void close() { 56 | synchronized (this.isUsed) { 57 | if (this.isUsed.get()) { 58 | this.sdkService.releaseSdk(this.sdkHash); 59 | this.isUsed.set(false); 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /server/test-data/pod_specs/Wilddog.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Wilddog", 3 | "version": "2.3.6", 4 | "summary": "安全可靠的实时通信云", 5 | "description": "野狗为企业和开发者提供了可编程的实时数据、语音、视频通信能力,以及身份认证服务,可以安全地构建丰富场景化的实时通信业务。", 6 | "homepage": "https://www.wilddog.com/", 7 | "license": { 8 | "type": "Copy right", 9 | "text": "https://www.wilddog.com/terms/sa" 10 | }, 11 | "authors": { 12 | "Wilddog": "ceo@wilddog.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/WildDogTeam/wilddog-ios.git", 16 | "tag": "2.3.6" 17 | }, 18 | "platforms": { 19 | "ios": "7.0" 20 | }, 21 | "preserve_paths": "README.md", 22 | "default_subspecs": [ 23 | "Public", 24 | "Sync", 25 | "Auth", 26 | "Core" 27 | ], 28 | "subspecs": [ 29 | { 30 | "name": "Public", 31 | "source_files": [ 32 | "Wilddog/Sources/Wilddog.h" 33 | ], 34 | "preserve_paths": [ 35 | "Wilddog/Sources/module.modulemap" 36 | ], 37 | "dependencies": { 38 | "WilddogCore": "~>2.0.9" 39 | }, 40 | "user_target_xcconfig": { 41 | "HEADER_SEARCH_PATHS": "$(inherited) ${PODS_ROOT}/Wilddog/Wilddog/Sources" 42 | } 43 | }, 44 | { 45 | "name": "Sync", 46 | "dependencies": { 47 | "Wilddog/Public": [ 48 | 49 | ], 50 | "WilddogSync": "~>2.3.6" 51 | } 52 | }, 53 | { 54 | "name": "Auth", 55 | "dependencies": { 56 | "Wilddog/Public": [ 57 | 58 | ], 59 | "WilddogAuth": "~>2.0.7" 60 | } 61 | }, 62 | { 63 | "name": "Core", 64 | "dependencies": { 65 | "Wilddog/Public": [ 66 | 67 | ] 68 | } 69 | }, 70 | { 71 | "name": "Video", 72 | "dependencies": { 73 | "WilddogVideo": [ 74 | 75 | ] 76 | } 77 | } 78 | ] 79 | } 80 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/PlatformConfig.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | public class PlatformConfig { 8 | 9 | public Map env = new HashMap<>(); 10 | public Map context = new HashMap<>(); 11 | public String exePrefix; // deprecated 12 | public String exeExt; // deprecated 13 | public String writeLibPattern; 14 | public String writeShLibPattern; 15 | public String writeExePattern; 16 | public String zipContentPattern; 17 | public String shlibRe; 18 | public String stlibRe; 19 | public String sourceRe; 20 | public String javaSourceRe; 21 | public String compileCmd; 22 | public String linkCmd; 23 | public List linkCmds; 24 | public String libCmd; 25 | public String dxCmd; 26 | public String aapt2compileCmd; 27 | public String aapt2linkCmd; 28 | public String rjavaCmd; 29 | public String manifestName; 30 | public String manifestMergeCmd; 31 | public String bitcodeStripCmd; // deprecated 32 | public String proGuardSourceRe; 33 | public String proGuardCmd; 34 | public String windresCmd; 35 | public String symbolCmd; 36 | public String symbolsPattern; 37 | public List allowedLibs; 38 | public List allowedFlags; 39 | public List allowedSymbols; 40 | 41 | public String protoEngineCxxCmd; 42 | public String protoPipelineCmd; 43 | public String protoPipelineOutputRe; 44 | 45 | // C++ 46 | public String compileCmdCXX; 47 | public String compileCmdCXXSh; 48 | public String linkCmdCXX; 49 | public String linkCmdCXXSh; 50 | 51 | // Java 52 | public String javacCmd; 53 | public String jarCmd; 54 | 55 | // Zig 56 | public String zigSourceRe; 57 | public String zigCompileCmd; 58 | 59 | // Swift 60 | public String emitSwiftHeaderCmd; 61 | public String emitSwiftModuleCmd; 62 | public String compileSwiftCmd; 63 | 64 | // C# 65 | public String csSourceRe; 66 | 67 | // Deprecated 68 | public String mtCmd; // Deprecated, use windres instead (Deprecated at 1.2.135) 69 | } 70 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/cocoapods/CocoaPodsServiceBuildState.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.cocoapods; 2 | 3 | import java.io.File; 4 | import java.nio.file.Path; 5 | 6 | import com.defold.extender.ExtenderBuildState; 7 | import com.defold.extender.ExtenderUtil; 8 | 9 | public class CocoaPodsServiceBuildState { 10 | File workingDir; 11 | File podsDir; 12 | File unpackedFrameworksDir; 13 | File targetSupportFilesDir; 14 | PodUtils.Platform selectedPlatform; 15 | 16 | CocoaPodsServiceBuildState() { } 17 | 18 | CocoaPodsServiceBuildState(ExtenderBuildState extenderBuildState) { 19 | this.workingDir = new File(extenderBuildState.getJobDir(), "CocoaPodsService"); 20 | this.workingDir.mkdirs(); 21 | this.podsDir = new File(workingDir, "Pods"); 22 | this.podsDir.mkdirs(); 23 | 24 | this.selectedPlatform = PodUtils.Platform.UNKNOWN; 25 | String platform = extenderBuildState.getBuildPlatform(); 26 | if (ExtenderUtil.isIOSTarget(platform)) { 27 | this.selectedPlatform = extenderBuildState.getBuildArch().equals("arm64") ? PodUtils.Platform.IPHONEOS : PodUtils.Platform.IPHONESIMULATOR; 28 | } else if (ExtenderUtil.isMacOSTarget(platform)) { 29 | this.selectedPlatform = PodUtils.Platform.MACOSX; 30 | } 31 | this.unpackedFrameworksDir = Path.of( 32 | extenderBuildState.getBuildDir().toString(), 33 | String.format("%s%s", extenderBuildState.getBuildConfiguration(), this.selectedPlatform.toString().toLowerCase()), 34 | "XCFrameworkIntermediates" 35 | ).toFile(); 36 | this.unpackedFrameworksDir.mkdirs(); 37 | 38 | this.targetSupportFilesDir = new File(this.podsDir, "Target Support Files"); 39 | } 40 | 41 | public File getWorkingDir() { 42 | return workingDir; 43 | } 44 | 45 | public File getPodsDir() { 46 | return podsDir; 47 | } 48 | 49 | public File getUnpackedFrameworksDir() { 50 | return unpackedFrameworksDir; 51 | } 52 | 53 | public PodUtils.Platform getSelectedPlatform() { 54 | return selectedPlatform; 55 | } 56 | 57 | public File getTargetSupportFilesDir() { 58 | return targetSupportFilesDir; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /server/src/test/java/com/defold/extender/ZipUtilsTest.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | import static org.junit.jupiter.api.Assertions.assertNotNull; 5 | import static org.junit.jupiter.api.Assertions.assertTrue; 6 | 7 | import java.io.File; 8 | import java.io.FileInputStream; 9 | import java.io.FileOutputStream; 10 | import java.io.IOException; 11 | import java.nio.file.Files; 12 | import java.nio.file.Path; 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | import org.junit.jupiter.api.Test; 17 | 18 | public class ZipUtilsTest { 19 | 20 | @Test 21 | public void zipAndUnzipFiles() throws IOException { 22 | Path sourceFile1 = Files.createTempFile("zipTest", "tmp"); 23 | Path sourceFile2 = Files.createTempFile("zipTest", "tmp"); 24 | Path destinationFile = Files.createTempFile("archive", "zip"); 25 | Path targetDirectory = Files.createTempDirectory("target"); 26 | 27 | List files = new ArrayList<>(); 28 | files.add(sourceFile1.toFile()); 29 | files.add(sourceFile2.toFile()); 30 | 31 | ZipUtils.zip(new FileOutputStream(destinationFile.toFile()), null, files); 32 | 33 | ZipUtils.unzip(new FileInputStream(destinationFile.toFile()), targetDirectory); 34 | 35 | assertEquals(2, targetDirectory.toFile().listFiles().length); 36 | } 37 | 38 | @Test 39 | public void zipFilesToFile() throws IOException { 40 | File targetDirectory = Files.createTempDirectory("test").toFile(); 41 | String zipFilename = targetDirectory.getAbsolutePath() + "/archive.zip"; 42 | 43 | Path sourceFile1 = Files.createTempFile("zipTest", "tmp"); 44 | Path sourceFile2 = Files.createTempFile("zipTest", "tmp"); 45 | 46 | List files = new ArrayList<>(); 47 | files.add(sourceFile1.toFile()); 48 | files.add(sourceFile2.toFile()); 49 | 50 | File zipFile = ZipUtils.zip(files, null, zipFilename); 51 | File[] filesInTarget = targetDirectory.listFiles(); 52 | 53 | assertNotNull(filesInTarget); 54 | assertEquals(1, filesInTarget.length); 55 | assertEquals(zipFile.length(), filesInTarget[0].length()); 56 | assertTrue(filesInTarget[0].length() > 0); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/log/ExtenderLogEnhancerConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.log; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 5 | import org.springframework.core.env.Environment; 6 | import org.springframework.stereotype.Component; 7 | 8 | import com.google.cloud.MonitoredResource; 9 | import com.google.cloud.spring.core.DefaultGcpProjectIdProvider; 10 | 11 | @Component 12 | @ConditionalOnProperty(name = "spring.cloud.gcp.logging.enabled", havingValue = "true") 13 | public class ExtenderLogEnhancerConfiguration { 14 | 15 | private String instanceName; 16 | private String applicationName; 17 | private String instanceLocation; 18 | private String projectId; 19 | private MonitoredResource monitoredResource; 20 | 21 | private static ExtenderLogEnhancerConfiguration instance; 22 | private ExtenderLogEnhancerConfiguration(@Autowired Environment env) { 23 | if (instance != null) { 24 | throw new IllegalStateException("ExtenderLogEnhancerConfiguration already initialized"); 25 | } 26 | instance = this; 27 | this.instanceName = env.getProperty("management.metrics.tags.instance", "unknown"); 28 | this.applicationName = env.getProperty("management.metrics.tags.application", "unknown"); 29 | this.instanceLocation = env.getProperty("extender.logging.instance-location", "europe-west1-b"); 30 | this.projectId = new DefaultGcpProjectIdProvider().getProjectId(); 31 | this.monitoredResource = MonitoredResource.newBuilder("generic_node") 32 | .addLabel("project_id", projectId) 33 | .addLabel("location", instanceLocation) 34 | .addLabel("namespace", applicationName) 35 | .addLabel("node_id", instanceName) 36 | .build(); 37 | } 38 | 39 | public static boolean isInitialized() { 40 | return instance != null; 41 | } 42 | 43 | public static MonitoredResource getMonitoredResource() { 44 | return instance != null ? instance.monitoredResource : null; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /server/test-data/pod_specs/Sentry.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sentry", 3 | "version": "8.52.1", 4 | "summary": "Sentry client for cocoa", 5 | "homepage": "https://github.com/getsentry/sentry-cocoa", 6 | "license": "mit", 7 | "authors": "Sentry", 8 | "source": { 9 | "git": "https://github.com/getsentry/sentry-cocoa.git", 10 | "tag": "8.52.1" 11 | }, 12 | "platforms": { 13 | "ios": "11.0", 14 | "osx": "10.13", 15 | "tvos": "11.0", 16 | "watchos": "4.0", 17 | "visionos": "1.0" 18 | }, 19 | "module_name": "Sentry", 20 | "requires_arc": true, 21 | "frameworks": "Foundation", 22 | "swift_versions": "5.5", 23 | "pod_target_xcconfig": { 24 | "GCC_ENABLE_CPP_EXCEPTIONS": "YES", 25 | "CLANG_CXX_LANGUAGE_STANDARD": "c++14", 26 | "CLANG_CXX_LIBRARY": "libc++", 27 | "APPLICATION_EXTENSION_API_ONLY": "YES", 28 | "SWIFT_INCLUDE_PATHS": "${PODS_TARGET_SRCROOT}/Sources/Sentry/include", 29 | "OTHER_CFLAGS": "$(inherited) -DAPPLICATION_EXTENSION_API_ONLY_$(APPLICATION_EXTENSION_API_ONLY)" 30 | }, 31 | "watchos": { 32 | "pod_target_xcconfig": { 33 | "OTHER_LDFLAGS": "$(inherited) -framework WatchKit" 34 | } 35 | }, 36 | "default_subspecs": [ 37 | "Core" 38 | ], 39 | "subspecs": [ 40 | { 41 | "name": "Core", 42 | "source_files": [ 43 | "Sources/Sentry/**/*.{h,hpp,m,mm,c,cpp}", 44 | "Sources/SentryCrash/**/*.{h,hpp,m,mm,c,cpp}", 45 | "Sources/Swift/**/*.{swift,h,hpp,m,mm,c,cpp}" 46 | ], 47 | "preserve_paths": "Sources/Sentry/include/module.modulemap", 48 | "public_header_files": "Sources/Sentry/Public/*.h", 49 | "resource_bundles": { 50 | "Sentry": "Sources/Resources/PrivacyInfo.xcprivacy" 51 | } 52 | }, 53 | { 54 | "name": "HybridSDK", 55 | "source_files": [ 56 | "Sources/Sentry/**/*.{h,hpp,m,mm,c,cpp}", 57 | "Sources/SentryCrash/**/*.{h,hpp,m,mm,c,cpp}", 58 | "Sources/Swift/**/*.{swift,h,hpp,m,mm,c,cpp}" 59 | ], 60 | "preserve_paths": "Sources/Sentry/include/module.modulemap", 61 | "public_header_files": [ 62 | "Sources/Sentry/Public/*.h", 63 | "Sources/Sentry/include/HybridPublic/*.h" 64 | ], 65 | "resource_bundles": { 66 | "Sentry": "Sources/Resources/PrivacyInfo.xcprivacy" 67 | } 68 | } 69 | ], 70 | "swift_version": "5.5" 71 | } -------------------------------------------------------------------------------- /server/configs/application-influx.yml: -------------------------------------------------------------------------------- 1 | management: 2 | metrics: 3 | tags: 4 | application: extender 5 | influx: 6 | metrics: 7 | export: 8 | api-version: v2 # API version of InfluxDB to use. Defaults to 'v1' unless an org is configured. If an org is configured, defaults to 'v2'. 9 | auto-create-db: true # Whether to create the InfluxDB database if it does not exist before attempting to publish metrics to it. InfluxDB v1 only. (Default: true) 10 | batch-size: 10000 # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made. (Default: 10000) 11 | bucket: metrics # Bucket for metrics. Use either the bucket name or ID. Defaults to the value of the db property if not set. InfluxDB v2 only. 12 | compressed: true # Whether to enable GZIP compression of metrics batches published to InfluxDB. (Default: true) 13 | connect-timeout: 1s # Connection timeout for requests to this backend. (Default: 1s) 14 | consistency: one # Write consistency for each point. (Default: one) 15 | # db: extender # Database to send metrics to. InfluxDB v1 only. (Default: mydb) 16 | enabled: true # Whether exporting of metrics to this backend is enabled. (Default: true) 17 | num-threads: 2 # Number of threads to use with the metrics publishing scheduler. (Default: 2) 18 | org: defold # Org to write metrics to. InfluxDB v2 only. 19 | # password: mysecret # Login password of the InfluxDB server. InfluxDB v1 only. 20 | read-timeout: 10s # Read timeout for requests to this backend. (Default: 10s) 21 | # retention-policy: my_rp # Retention policy to use (InfluxDB writes to the DEFAULT retention policy if one is not specified). InfluxDB v1 only. 22 | step: 1m # Step size (i.e. reporting frequency) to use. (Default: 1m) 23 | token: "foo" # Authentication token to use with calls to the InfluxDB backend. For InfluxDB v1, the Bearer scheme is used. For v2, the Token scheme is used. 24 | uri: http://victoriametrics:8428 # URI of the InfluxDB server. (Default: http://localhost:8086) 25 | # user-name: myusername # Login user of the InfluxDB server. InfluxDB v1 only. 26 | -------------------------------------------------------------------------------- /server/test-data/ext_std/src/test_ext.cpp: -------------------------------------------------------------------------------- 1 | 2 | // myextension.cpp 3 | // Extension lib defines 4 | #define LIB_NAME "MyExtension" 5 | #define MODULE_NAME "myextension" 6 | 7 | // include the Defold SDK 8 | #include 9 | #include 10 | #include 11 | #include "std.h" 12 | 13 | std::string Test(const std::string& a, const std::string& b) 14 | { 15 | return a + b; 16 | } 17 | 18 | // Combines two strings 19 | static int Combine(lua_State* L) 20 | { 21 | // Check and get parameter string from stack 22 | const char* str1 = luaL_checkstring(L, 1); 23 | const char* str2 = luaL_checkstring(L, 2); 24 | 25 | if (str1 && str2) 26 | { 27 | std::string a = str1; 28 | std::string b = str2; 29 | std::string out; 30 | dmStdTest::Combine(a, b, out); 31 | 32 | lua_pushlstring(L, out.c_str(), out.size()); 33 | return 1; 34 | } 35 | std::string c = Test("Hello", "World"); 36 | 37 | lua_pushlstring(L, c.c_str(), c.size()); 38 | return 1; 39 | } 40 | 41 | // Functions exposed to Lua 42 | static const luaL_reg Module_methods[] = 43 | { 44 | {"combine", Combine}, 45 | {0, 0} 46 | }; 47 | 48 | static void LuaInit(lua_State* L) 49 | { 50 | int top = lua_gettop(L); 51 | 52 | // Register lua names 53 | luaL_register(L, MODULE_NAME, Module_methods); 54 | 55 | lua_pop(L, 1); 56 | assert(top == lua_gettop(L)); 57 | } 58 | 59 | dmExtension::Result AppInitializeMyExtension(dmExtension::AppParams* params) 60 | { 61 | return dmExtension::RESULT_OK; 62 | } 63 | 64 | dmExtension::Result InitializeMyExtension(dmExtension::Params* params) 65 | { 66 | // Init Lua 67 | LuaInit(params->m_L); 68 | printf("Registered %s Extension\n", MODULE_NAME); 69 | return dmExtension::RESULT_OK; 70 | } 71 | 72 | dmExtension::Result AppFinalizeMyExtension(dmExtension::AppParams* params) 73 | { 74 | return dmExtension::RESULT_OK; 75 | } 76 | 77 | dmExtension::Result FinalizeMyExtension(dmExtension::Params* params) 78 | { 79 | return dmExtension::RESULT_OK; 80 | } 81 | 82 | 83 | // Defold SDK uses a macro for setting up extension entry points: 84 | // 85 | // DM_DECLARE_EXTENSION(symbol, name, app_init, app_final, init, update, on_event, final) 86 | 87 | DM_DECLARE_EXTENSION(MyExtension, LIB_NAME, AppInitializeMyExtension, AppFinalizeMyExtension, InitializeMyExtension, 0, 0, FinalizeMyExtension) 88 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/cache/DataCacheFactory.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.beans.factory.annotation.Value; 6 | import org.springframework.stereotype.Service; 7 | 8 | import java.io.IOException; 9 | 10 | @Service 11 | public class DataCacheFactory { 12 | 13 | private static final Logger LOGGER = LoggerFactory.getLogger(DataCacheFactory.class); 14 | 15 | private static final String STORE_TYPE_GCP = "GCP"; 16 | private static final String STORE_TYPE_LOCAL = "LOCAL"; 17 | 18 | private final boolean isEnabled; 19 | private final String storeType; 20 | private final String prefix; 21 | private final String baseDirectory; 22 | private final String bucketName; 23 | 24 | public DataCacheFactory(@Value("${extender.cache.enabled}") boolean isEnabled, 25 | @Value("${extender.cache.type:}") String storeType, 26 | @Value("${extender.cache.prefix:}") String prefix, 27 | @Value("${extender.cache.local.basedir:}") String baseDirectory, 28 | @Value("${extender.cache.gcp.bucket:}") String bucketName) { 29 | this.isEnabled = isEnabled; 30 | this.storeType = storeType; 31 | this.prefix = prefix; 32 | this.baseDirectory = baseDirectory; 33 | this.bucketName = bucketName; 34 | } 35 | 36 | public DataCache createCache() { 37 | if (!isEnabled) { 38 | LOGGER.info("Creating dummy data cache since cache is disabled"); 39 | return new DummyDataCache(); 40 | } 41 | 42 | if (STORE_TYPE_GCP.equals(storeType)) { 43 | LOGGER.info("Creating GCP cache with bucket name {}", bucketName); 44 | return new GCPDataCache(bucketName, prefix); 45 | } else if (STORE_TYPE_LOCAL.equals(storeType)) { 46 | LOGGER.info("Creating local disk cache in directory {}", baseDirectory); 47 | try { 48 | return new LocalDiskDataCache(baseDirectory); 49 | } catch (IOException e) { 50 | throw new IllegalArgumentException("Illegal base directory for local disk cache: " + baseDirectory, e); 51 | } 52 | } else { 53 | throw new IllegalArgumentException(String.format("No cache store of type %s implemented!", storeType)); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /server/docker/Dockerfile.wine-env: -------------------------------------------------------------------------------- 1 | FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.5.0 2 | 3 | # Installation notes: https://wiki.winehq.org/Ubuntu 4 | # TODO: Backup the files as descibed here: https://wiki.winehq.org/Ubuntu 5 | RUN \ 6 | echo "Wine deps" && \ 7 | apt-get update && \ 8 | apt-get install -y --no-install-recommends \ 9 | python-is-python3 \ 10 | openssl \ 11 | gnupg1 \ 12 | gpg-agent \ 13 | build-essential \ 14 | software-properties-common \ 15 | apt-transport-https \ 16 | ca-certificates \ 17 | ca-certificates-java \ 18 | xvfb \ 19 | cabextract && \ 20 | apt-get clean autoclean autoremove 21 | 22 | # From https://github.com/scottyhardy/docker-wine/blob/master/Dockerfile 23 | 24 | # Install wine 25 | ARG WINE_BRANCH="stable" 26 | RUN wget -nv -O- https://dl.winehq.org/wine-builds/winehq.key | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ 27 | && echo "deb https://dl.winehq.org/wine-builds/ubuntu/ $(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2) main" >> /etc/apt/sources.list \ 28 | && dpkg --add-architecture i386 \ 29 | && apt-get update \ 30 | && DEBIAN_FRONTEND="noninteractive" apt-get install -y --install-recommends winehq-${WINE_BRANCH} \ 31 | && rm -rf /var/lib/apt/lists/* 32 | 33 | # Install winetricks 34 | RUN wget -nv -O /usr/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ 35 | && chmod +x /usr/bin/winetricks 36 | 37 | ENV PATH=${PATH}:/opt/wine-stable/bin 38 | 39 | # Disable all debug messages 40 | ENV WINEDEBUG="-all" 41 | 42 | ENV WINEPREFIX="/var/extender/.wine" 43 | 44 | RUN \ 45 | echo "Wine Init" && \ 46 | mkdir -p ${WINEPREFIX} 47 | 48 | ENV DISPLAY=":1" 49 | RUN \ 50 | set -xe && \ 51 | WINEDLLOVERRIDES="mscoree,mshtml=" xvfb-run wine wineboot && \ 52 | xvfb-run wineserver -w 53 | # xvfb-run wineserver -w && \ 54 | # xvfb-run winetricks -q vcrun2015 55 | 56 | RUN \ 57 | chown -R extender: $WINEPREFIX 58 | 59 | 60 | # 61 | # llvm 62 | # 63 | ENV CLANG_VERSION=17 64 | RUN \ 65 | echo "LLVM + CLANG ${CLANG_VERSION}" && \ 66 | wget https://apt.llvm.org/llvm.sh && \ 67 | chmod +x llvm.sh && \ 68 | ./llvm.sh ${CLANG_VERSION} && \ 69 | rm llvm.sh 70 | 71 | ENV CLANG_17_HOME=/usr/lib/llvm-${CLANG_VERSION} 72 | # Possibly get the "-resource-dir" from clang++ -### empty.cpp 73 | ENV CLANG_17_RESOURCE_DIR=/usr/lib/llvm-${CLANG_VERSION}/lib/clang/${CLANG_VERSION} 74 | ENV PATH=${CLANG_17_HOME}/bin:$PATH 75 | -------------------------------------------------------------------------------- /server/test-data/xcconfigs/DivKit.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DivKit 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DivKit_LayoutKit/LayoutKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DivKit_LayoutKitInterface/LayoutKitInterface.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DivKit_Serialization/Serialization.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/VGSL/VGSL.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/VGSLFundamentals/VGSLFundamentals.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/VGSLNetworking/VGSLNetworking.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/VGSLUI/VGSLUI.modulemap" 5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DivKit_LayoutKit/LayoutKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DivKit_LayoutKitInterface/LayoutKitInterface.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DivKit_Serialization/Serialization.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/VGSL/VGSL.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/VGSLFundamentals/VGSLFundamentals.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/VGSLNetworking/VGSLNetworking.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/VGSLUI/VGSLUI.modulemap" -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/DivKit 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DivKit_LayoutKit" "${PODS_CONFIGURATION_BUILD_DIR}/DivKit_LayoutKitInterface" "${PODS_CONFIGURATION_BUILD_DIR}/DivKit_Serialization" "${PODS_CONFIGURATION_BUILD_DIR}/VGSL" "${PODS_CONFIGURATION_BUILD_DIR}/VGSLFundamentals" "${PODS_CONFIGURATION_BUILD_DIR}/VGSLNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/VGSLUI" 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /server/src/main/java/com/defold/extender/services/cocoapods/CreateBuildSpecArgs.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.services.cocoapods; 2 | 3 | import java.io.File; 4 | import java.util.Map; 5 | 6 | import com.defold.extender.ExtenderBuildState; 7 | 8 | public class CreateBuildSpecArgs { 9 | public static class Builder { 10 | private File podsDir; 11 | private File buildDir; 12 | private PodUtils.Platform selectedPlatform; 13 | private String configuration; 14 | private Map jobEnvContext; 15 | private IConfigParser configParser; 16 | 17 | public Builder() { } 18 | 19 | public Builder setJobContext(Map context) { 20 | this.jobEnvContext = context; 21 | return this; 22 | } 23 | 24 | public Builder setConfigParser(IConfigParser parser) { 25 | this.configParser = parser; 26 | return this; 27 | } 28 | 29 | public Builder setExtenderBuildState(ExtenderBuildState buildState) { 30 | this.buildDir = buildState.getBuildDir(); 31 | this.configuration = buildState.getBuildConfiguration(); 32 | return this; 33 | } 34 | 35 | public Builder setCocoapodsBuildState(CocoaPodsServiceBuildState buildState) { 36 | this.podsDir = buildState.getPodsDir(); 37 | this.selectedPlatform = buildState.getSelectedPlatform(); 38 | return this; 39 | } 40 | 41 | public CreateBuildSpecArgs build() { 42 | return new CreateBuildSpecArgs(this); 43 | } 44 | } 45 | 46 | private CreateBuildSpecArgs(Builder builder) { 47 | this.podsDir = builder.podsDir; 48 | this.buildDir = builder.buildDir; 49 | this.jobEnvContext = builder.jobEnvContext; 50 | this.selectedPlatform = builder.selectedPlatform; 51 | this.configuration = builder.configuration; 52 | this.configParser = builder.configParser; 53 | } 54 | 55 | private CreateBuildSpecArgs(CreateBuildSpecArgs copy) { 56 | this.podsDir = copy.podsDir; 57 | this.buildDir = copy.buildDir; 58 | this.jobEnvContext = copy.jobEnvContext; 59 | this.selectedPlatform = copy.selectedPlatform; 60 | this.configuration = copy.configuration; 61 | this.configParser = copy.configParser; 62 | } 63 | 64 | protected File podsDir; 65 | protected File buildDir; 66 | protected PodUtils.Platform selectedPlatform; 67 | protected String configuration; 68 | protected Map jobEnvContext; 69 | protected IConfigParser configParser; 70 | } 71 | -------------------------------------------------------------------------------- /server/src/test/java/com/defold/extender/cache/info/CacheInfoFileParserTest.java: -------------------------------------------------------------------------------- 1 | package com.defold.extender.cache.info; 2 | 3 | import com.defold.extender.cache.CacheEntry; 4 | import com.defold.extender.TestUtils; 5 | 6 | import static org.junit.jupiter.api.Assertions.assertEquals; 7 | 8 | import java.io.File; 9 | import java.io.FileInputStream; 10 | import java.util.List; 11 | 12 | import org.junit.jupiter.api.Test; 13 | 14 | public class CacheInfoFileParserTest { 15 | 16 | @Test 17 | public void parseFile() throws Exception { 18 | CacheInfoFileParser parser = new CacheInfoFileParser(); 19 | File file = new File(ClassLoader.getSystemResource("upload/ne-cache-info.json").toURI()); 20 | 21 | CacheInfoWrapper info = parser.parse(file); 22 | List entries = info.getEntries(); 23 | 24 | assertEquals(1, info.getVersion()); 25 | assertEquals("sha256", info.getHashType()); 26 | assertEquals(2, entries.size()); 27 | 28 | CacheEntry entry1 = entries.get(0); 29 | assertEquals(TestUtils.CACHE_ENTRIES[0].getPath(), entry1.getPath()); 30 | assertEquals(TestUtils.CACHE_ENTRIES[0].getKey(), entry1.getKey()); 31 | 32 | CacheEntry entry2 = entries.get(1); 33 | assertEquals(TestUtils.CACHE_ENTRIES[1].getPath(), entry2.getPath()); 34 | assertEquals(TestUtils.CACHE_ENTRIES[1].getKey(), entry2.getKey()); 35 | } 36 | 37 | @Test 38 | public void parseInputStream() throws Exception { 39 | CacheInfoFileParser parser = new CacheInfoFileParser(); 40 | File file = new File(ClassLoader.getSystemResource("upload/ne-cache-info.json").toURI()); 41 | 42 | CacheInfoWrapper info = parser.parse(new FileInputStream(file)); 43 | List entries = info.getEntries(); 44 | 45 | assertEquals(1, info.getVersion()); 46 | assertEquals("sha256", info.getHashType()); 47 | 48 | CacheEntry entry1 = entries.get(0); 49 | assertEquals(TestUtils.CACHE_ENTRIES[0].getPath(), entry1.getPath()); 50 | assertEquals(TestUtils.CACHE_ENTRIES[0].getKey(), entry1.getKey()); 51 | 52 | CacheEntry entry2 = entries.get(1); 53 | assertEquals(TestUtils.CACHE_ENTRIES[1].getPath(), entry2.getPath()); 54 | assertEquals(TestUtils.CACHE_ENTRIES[1].getKey(), entry2.getKey()); 55 | } 56 | 57 | @Test 58 | public void parseOldFile() throws Exception { 59 | CacheInfoFileParser parser = new CacheInfoFileParser(); 60 | File file = new File(ClassLoader.getSystemResource("upload/old-ne-cache-info.json").toURI()); 61 | 62 | CacheInfoWrapper info = parser.parse(file); 63 | assertEquals(0, info.getVersion()); 64 | assertEquals(null, info.getHashType()); 65 | } 66 | } 67 | --------------------------------------------------------------------------------