capacitor-plugin-playlist 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/android/.gradle/8.0.2/checksums/checksums.lock +0 -0
  2. package/android/.gradle/8.0.2/checksums/md5-checksums.bin +0 -0
  3. package/android/.gradle/8.0.2/checksums/sha1-checksums.bin +0 -0
  4. package/android/.gradle/8.0.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  5. package/android/.gradle/8.0.2/executionHistory/executionHistory.bin +0 -0
  6. package/android/.gradle/8.0.2/executionHistory/executionHistory.lock +0 -0
  7. package/android/.gradle/8.0.2/fileHashes/fileHashes.bin +0 -0
  8. package/android/.gradle/8.0.2/fileHashes/fileHashes.lock +0 -0
  9. package/android/.gradle/8.0.2/fileHashes/resourceHashesCache.bin +0 -0
  10. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  12. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  13. package/android/.gradle/config.properties +2 -0
  14. package/android/.gradle/file-system.probe +0 -0
  15. package/android/.idea/compiler.xml +6 -0
  16. package/android/.idea/gradle.xml +8 -3
  17. package/android/.idea/kotlinc.xml +6 -0
  18. package/android/.idea/migrations.xml +10 -0
  19. package/android/.idea/misc.xml +2 -2
  20. package/android/.project +34 -0
  21. package/android/bin/.gradle/8.0.2/checksums/checksums.lock +0 -0
  22. package/android/bin/.gradle/8.0.2/checksums/md5-checksums.bin +0 -0
  23. package/android/bin/.gradle/8.0.2/checksums/sha1-checksums.bin +0 -0
  24. package/android/bin/.gradle/8.0.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  25. package/android/bin/.gradle/8.0.2/executionHistory/executionHistory.bin +0 -0
  26. package/android/bin/.gradle/8.0.2/executionHistory/executionHistory.lock +0 -0
  27. package/android/bin/.gradle/8.0.2/fileChanges/last-build.bin +0 -0
  28. package/android/bin/.gradle/8.0.2/fileHashes/fileHashes.bin +0 -0
  29. package/android/bin/.gradle/8.0.2/fileHashes/fileHashes.lock +0 -0
  30. package/android/bin/.gradle/8.0.2/fileHashes/resourceHashesCache.bin +0 -0
  31. package/android/bin/.gradle/8.0.2/gc.properties +0 -0
  32. package/android/bin/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  33. package/android/bin/.gradle/buildOutputCleanup/cache.properties +2 -0
  34. package/android/bin/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  35. package/android/bin/.gradle/config.properties +2 -0
  36. package/android/bin/.gradle/file-system.probe +0 -0
  37. package/android/bin/.gradle/vcs-1/gc.properties +0 -0
  38. package/android/bin/.idea/compiler.xml +6 -0
  39. package/android/bin/.idea/gradle.xml +19 -0
  40. package/android/bin/.idea/kotlinc.xml +6 -0
  41. package/android/bin/.idea/migrations.xml +10 -0
  42. package/android/bin/.idea/misc.xml +9 -0
  43. package/android/bin/.idea/vcs.xml +6 -0
  44. package/android/bin/.project +34 -0
  45. package/android/bin/.settings/org.eclipse.buildship.core.prefs +13 -0
  46. package/android/bin/build.gradle +79 -0
  47. package/android/bin/gradle/wrapper/gradle-wrapper.jar +0 -0
  48. package/android/bin/gradle/wrapper/gradle-wrapper.properties +6 -0
  49. package/android/bin/gradle.properties +22 -0
  50. package/android/bin/gradlew +244 -0
  51. package/android/bin/gradlew.bat +92 -0
  52. package/android/bin/local.properties +8 -0
  53. package/android/bin/proguard-rules.pro +21 -0
  54. package/android/bin/settings.gradle +2 -0
  55. package/android/bin/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.class +0 -0
  56. package/android/bin/src/main/AndroidManifest.xml +4 -0
  57. package/android/bin/src/main/java/org/dwbn/plugins/playlist/App.kt +62 -0
  58. package/android/bin/src/main/java/org/dwbn/plugins/playlist/FakeR.kt +39 -0
  59. package/android/bin/src/main/java/org/dwbn/plugins/playlist/OnStatusCallback.kt +34 -0
  60. package/android/bin/src/main/java/org/dwbn/plugins/playlist/OnStatusReportListener.class +0 -0
  61. package/android/bin/src/main/java/org/dwbn/plugins/playlist/PlaylistItemOptions.class +0 -0
  62. package/android/bin/src/main/java/org/dwbn/plugins/playlist/PlaylistPlugin.kt +356 -0
  63. package/android/bin/src/main/java/org/dwbn/plugins/playlist/RmxAudioErrorType.class +0 -0
  64. package/android/bin/src/main/java/org/dwbn/plugins/playlist/RmxAudioPlayer.class +0 -0
  65. package/android/bin/src/main/java/org/dwbn/plugins/playlist/RmxAudioStatusMessage.class +0 -0
  66. package/android/bin/src/main/java/org/dwbn/plugins/playlist/RmxConstants.class +0 -0
  67. package/android/bin/src/main/java/org/dwbn/plugins/playlist/TrackRemovalItem.class +0 -0
  68. package/android/bin/src/main/java/org/dwbn/plugins/playlist/data/AudioTrack.kt +94 -0
  69. package/android/bin/src/main/java/org/dwbn/plugins/playlist/manager/MediaControlsListener.kt +13 -0
  70. package/android/bin/src/main/java/org/dwbn/plugins/playlist/manager/Options.kt +77 -0
  71. package/android/bin/src/main/java/org/dwbn/plugins/playlist/manager/PlaylistManager.kt +286 -0
  72. package/android/bin/src/main/java/org/dwbn/plugins/playlist/notification/PlaylistNotificationProvider.kt +26 -0
  73. package/android/bin/src/main/java/org/dwbn/plugins/playlist/playlist/AudioApi.kt +101 -0
  74. package/android/bin/src/main/java/org/dwbn/plugins/playlist/playlist/AudioPlaylistHandler$Builder.class +0 -0
  75. package/android/bin/src/main/java/org/dwbn/plugins/playlist/playlist/AudioPlaylistHandler.class +0 -0
  76. package/android/bin/src/main/java/org/dwbn/plugins/playlist/playlist/BaseMediaApi.kt +40 -0
  77. package/android/bin/src/main/java/org/dwbn/plugins/playlist/service/MediaImageProvider.kt +79 -0
  78. package/android/bin/src/main/java/org/dwbn/plugins/playlist/service/MediaService.kt +53 -0
  79. package/android/bin/src/main/res/.gitkeep +0 -0
  80. package/android/bin/src/main/res/drawable/ic_closed_caption_white_24dp.xml +9 -0
  81. package/android/bin/src/main/res/drawable/ic_demo_icon_adaptive.xml +15 -0
  82. package/android/bin/src/main/res/drawable/ic_launcher_background.xml +48 -0
  83. package/android/bin/src/main/res/drawable/ic_launcher_foreground.xml +22 -0
  84. package/android/bin/src/main/res/drawable/ic_notification_icon.png +0 -0
  85. package/android/bin/src/main/res/layout/bridge_layout_main.xml +15 -0
  86. package/android/bin/src/main/res/values/colors.xml +3 -0
  87. package/android/bin/src/main/res/values/strings.xml +3 -0
  88. package/android/bin/src/main/res/values/styles.xml +3 -0
  89. package/android/bin/src/test/java/com/getcapacitor/ExampleUnitTest.class +0 -0
  90. package/android/build.gradle +0 -4
  91. package/android/local.properties +1 -1
  92. package/android/src/main/java/org/dwbn/plugins/playlist/manager/PlaylistManager.kt +2 -1
  93. package/dist/docs.json +1357 -3
  94. package/dist/esm/web.js +1 -6
  95. package/dist/esm/web.js.map +1 -1
  96. package/dist/plugin.cjs.js +1 -6
  97. package/dist/plugin.cjs.js.map +1 -1
  98. package/dist/plugin.js +1 -6
  99. package/dist/plugin.js.map +1 -1
  100. package/package.json +1 -1
  101. package/android/.gradle/checksums/checksums.lock +0 -0
  102. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  103. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  104. package/android/.idea/modules/android.iml +0 -18
  105. package/android/.idea/modules.xml +0 -8
  106. /package/android/{.gradle/configuration-cache → bin/.gradle/8.0.2/dependencies-accessors}/gc.properties +0 -0
@@ -1,2 +1,2 @@
1
- #Sun Oct 08 14:54:20 CEST 2023
1
+ #Sat Jul 13 00:28:49 CEST 2024
2
2
  gradle.version=8.0.2
@@ -0,0 +1,2 @@
1
+ #Sat Jul 13 01:10:53 CEST 2024
2
+ java.home=/Applications/Android Studio.app/Contents/jbr/Contents/Home
Binary file
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="CompilerConfiguration">
4
+ <bytecodeTargetLevel target="17" />
5
+ </component>
6
+ </project>
@@ -4,10 +4,15 @@
4
4
  <component name="GradleSettings">
5
5
  <option name="linkedExternalProjectsSettings">
6
6
  <GradleProjectSettings>
7
- <option name="testRunner" value="GRADLE" />
8
- <option name="distributionType" value="DEFAULT_WRAPPED" />
9
7
  <option name="externalProjectPath" value="$PROJECT_DIR$" />
10
- <option name="gradleJvm" value="21" />
8
+ <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
9
+ <option name="modules">
10
+ <set>
11
+ <option value="$PROJECT_DIR$" />
12
+ <option value="$PROJECT_DIR$/../node_modules/@capacitor/android/capacitor" />
13
+ </set>
14
+ </option>
15
+ <option name="resolveExternalAnnotations" value="false" />
11
16
  </GradleProjectSettings>
12
17
  </option>
13
18
  </component>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="KotlinJpsPluginSettings">
4
+ <option name="version" value="1.8.22" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectMigrations">
4
+ <option name="MigrateToGradleLocalJavaHome">
5
+ <set>
6
+ <option value="$PROJECT_DIR$" />
7
+ </set>
8
+ </option>
9
+ </component>
10
+ </project>
@@ -1,6 +1,6 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
1
  <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
2
+ <component name="ExternalStorageConfigurationManager" enabled="true" />
3
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
4
4
  <output url="file://$PROJECT_DIR$/build/classes" />
5
5
  </component>
6
6
  <component name="ProjectType">
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>capacitor-plugin-playlist</name>
4
+ <comment>Project capacitor-plugin-playlist created by Buildship.</comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.jdt.core.javabuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
14
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15
+ <arguments>
16
+ </arguments>
17
+ </buildCommand>
18
+ </buildSpec>
19
+ <natures>
20
+ <nature>org.eclipse.jdt.core.javanature</nature>
21
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22
+ </natures>
23
+ <filteredResources>
24
+ <filter>
25
+ <id>1717354886357</id>
26
+ <name></name>
27
+ <type>30</type>
28
+ <matcher>
29
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
30
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31
+ </matcher>
32
+ </filter>
33
+ </filteredResources>
34
+ </projectDescription>
File without changes
@@ -0,0 +1,2 @@
1
+ #Sat Jul 13 00:28:49 CEST 2024
2
+ gradle.version=8.0.2
@@ -0,0 +1,2 @@
1
+ #Sat Jul 13 01:10:53 CEST 2024
2
+ java.home=/Applications/Android Studio.app/Contents/jbr/Contents/Home
File without changes
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="CompilerConfiguration">
4
+ <bytecodeTargetLevel target="17" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GradleMigrationSettings" migrationVersion="1" />
4
+ <component name="GradleSettings">
5
+ <option name="linkedExternalProjectsSettings">
6
+ <GradleProjectSettings>
7
+ <option name="externalProjectPath" value="$PROJECT_DIR$" />
8
+ <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
9
+ <option name="modules">
10
+ <set>
11
+ <option value="$PROJECT_DIR$" />
12
+ <option value="$PROJECT_DIR$/../node_modules/@capacitor/android/capacitor" />
13
+ </set>
14
+ </option>
15
+ <option name="resolveExternalAnnotations" value="false" />
16
+ </GradleProjectSettings>
17
+ </option>
18
+ </component>
19
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="KotlinJpsPluginSettings">
4
+ <option name="version" value="1.8.22" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectMigrations">
4
+ <option name="MigrateToGradleLocalJavaHome">
5
+ <set>
6
+ <option value="$PROJECT_DIR$" />
7
+ </set>
8
+ </option>
9
+ </component>
10
+ </project>
@@ -0,0 +1,9 @@
1
+ <project version="4">
2
+ <component name="ExternalStorageConfigurationManager" enabled="true" />
3
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
4
+ <output url="file://$PROJECT_DIR$/build/classes" />
5
+ </component>
6
+ <component name="ProjectType">
7
+ <option name="id" value="Android" />
8
+ </component>
9
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>capacitor-plugin-playlist</name>
4
+ <comment>Project capacitor-plugin-playlist created by Buildship.</comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.jdt.core.javabuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
14
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15
+ <arguments>
16
+ </arguments>
17
+ </buildCommand>
18
+ </buildSpec>
19
+ <natures>
20
+ <nature>org.eclipse.jdt.core.javanature</nature>
21
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22
+ </natures>
23
+ <filteredResources>
24
+ <filter>
25
+ <id>1717354886357</id>
26
+ <name></name>
27
+ <type>30</type>
28
+ <matcher>
29
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
30
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31
+ </matcher>
32
+ </filter>
33
+ </filteredResources>
34
+ </projectDescription>
@@ -0,0 +1,13 @@
1
+ arguments=--init-script /var/folders/z8/yqqmzrfj5xj7gp3bjllxy9zh0000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/z8/yqqmzrfj5xj7gp3bjllxy9zh0000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
2
+ auto.sync=false
3
+ build.scans.enabled=false
4
+ connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5
+ connection.project.dir=
6
+ eclipse.preferences.version=1
7
+ gradle.user.home=
8
+ java.home=/opt/homebrew/Cellar/openjdk@11/11.0.23/libexec/openjdk.jdk/Contents/Home
9
+ jvm.arguments=
10
+ offline.mode=false
11
+ override.workspace.settings=true
12
+ show.console.view=true
13
+ show.executions.view=true
@@ -0,0 +1,79 @@
1
+ ext {
2
+ junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
4
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
5
+ exoPlayerVersion = project.hasProperty('exoPlayerVersion') ? rootProject.ext.exoPlayerVersion : "2.9.6"
6
+ }
7
+
8
+ buildscript {
9
+ ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.8.20'
10
+ repositories {
11
+ google()
12
+ mavenCentral()
13
+ }
14
+ dependencies {
15
+ classpath 'com.android.tools.build:gradle:8.0.0'
16
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
17
+ }
18
+ }
19
+
20
+ apply plugin: 'com.android.library'
21
+ apply plugin: 'kotlin-android'
22
+
23
+ android {
24
+ namespace "org.dwbn.plugins.playlist"
25
+ compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
26
+ defaultConfig {
27
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
28
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
29
+ versionCode 1
30
+ versionName "1.0"
31
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
32
+ }
33
+ buildTypes {
34
+ release {
35
+ minifyEnabled false
36
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
37
+ }
38
+ }
39
+ lintOptions {
40
+ abortOnError false
41
+ }
42
+ compileOptions {
43
+ sourceCompatibility JavaVersion.VERSION_17
44
+ targetCompatibility JavaVersion.VERSION_17
45
+ }
46
+ kotlinOptions {
47
+ jvmTarget = '17'
48
+ }
49
+ }
50
+
51
+ repositories {
52
+ google()
53
+ jcenter()
54
+ mavenCentral()
55
+ }
56
+
57
+
58
+ dependencies {
59
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
60
+ implementation project(':capacitor-android')
61
+ testImplementation "junit:junit:$junitVersion"
62
+ androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
63
+ androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
64
+ implementation "androidx.core:core-ktx:1.6.0"
65
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
66
+
67
+ // Image Exomedia
68
+ implementation 'com.devbrackets.android:exomedia:4.3.0'
69
+ implementation "com.google.android.exoplayer:extension-okhttp:$exoPlayerVersion"
70
+
71
+ // Image Loading
72
+ implementation 'com.github.bumptech.glide:glide:4.6.1'
73
+ annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
74
+
75
+ // Playlist support
76
+ implementation 'com.devbrackets.android:playlistcore:2.1.0'
77
+ implementation 'androidx.work:work-runtime-ktx:2.7.1'
78
+
79
+ }
@@ -0,0 +1,6 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
4
+ networkTimeout=10000
5
+ zipStoreBase=GRADLE_USER_HOME
6
+ zipStorePath=wrapper/dists
@@ -0,0 +1,22 @@
1
+ # Project-wide Gradle settings.
2
+
3
+ # IDE (e.g. Android Studio) users:
4
+ # Gradle settings configured through the IDE *will override*
5
+ # any settings specified in this file.
6
+
7
+ # For more details on how to configure your build environment visit
8
+ # http://www.gradle.org/docs/current/userguide/build_environment.html
9
+
10
+ # Specifies the JVM arguments used for the daemon process.
11
+ # The setting is particularly useful for tweaking memory settings.
12
+ org.gradle.jvmargs=-Xmx1536m
13
+
14
+ # When configured, Gradle will run in incubating parallel mode.
15
+ # This option should only be used with decoupled projects. More details, visit
16
+ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
+ # org.gradle.parallel=true
18
+
19
+ # AndroidX package structure to make it clearer which packages are bundled with the
20
+ # Android operating system, and which are packaged with your app's APK
21
+ # https://developer.android.com/topic/libraries/support-library/androidx-rn
22
+ android.useAndroidX=true
@@ -0,0 +1,244 @@
1
+ #!/bin/sh
2
+
3
+ #
4
+ # Copyright © 2015-2021 the original authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ ##############################################################################
20
+ #
21
+ # Gradle start up script for POSIX generated by Gradle.
22
+ #
23
+ # Important for running:
24
+ #
25
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26
+ # noncompliant, but you have some other compliant shell such as ksh or
27
+ # bash, then to run this script, type that shell name before the whole
28
+ # command line, like:
29
+ #
30
+ # ksh Gradle
31
+ #
32
+ # Busybox and similar reduced shells will NOT work, because this script
33
+ # requires all of these POSIX shell features:
34
+ # * functions;
35
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37
+ # * compound commands having a testable exit status, especially «case»;
38
+ # * various built-in commands including «command», «set», and «ulimit».
39
+ #
40
+ # Important for patching:
41
+ #
42
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
43
+ # by Bash, Ksh, etc; in particular arrays are avoided.
44
+ #
45
+ # The "traditional" practice of packing multiple parameters into a
46
+ # space-separated string is a well documented source of bugs and security
47
+ # problems, so this is (mostly) avoided, by progressively accumulating
48
+ # options in "$@", and eventually passing that to Java.
49
+ #
50
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52
+ # see the in-line comments for details.
53
+ #
54
+ # There are tweaks for specific operating systems such as AIX, CygWin,
55
+ # Darwin, MinGW, and NonStop.
56
+ #
57
+ # (3) This script is generated from the Groovy template
58
+ # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
+ # within the Gradle project.
60
+ #
61
+ # You can find Gradle at https://github.com/gradle/gradle/.
62
+ #
63
+ ##############################################################################
64
+
65
+ # Attempt to set APP_HOME
66
+
67
+ # Resolve links: $0 may be a link
68
+ app_path=$0
69
+
70
+ # Need this for daisy-chained symlinks.
71
+ while
72
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73
+ [ -h "$app_path" ]
74
+ do
75
+ ls=$( ls -ld "$app_path" )
76
+ link=${ls#*' -> '}
77
+ case $link in #(
78
+ /*) app_path=$link ;; #(
79
+ *) app_path=$APP_HOME$link ;;
80
+ esac
81
+ done
82
+
83
+ # This is normally unused
84
+ # shellcheck disable=SC2034
85
+ APP_BASE_NAME=${0##*/}
86
+ APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87
+
88
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90
+
91
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
92
+ MAX_FD=maximum
93
+
94
+ warn () {
95
+ echo "$*"
96
+ } >&2
97
+
98
+ die () {
99
+ echo
100
+ echo "$*"
101
+ echo
102
+ exit 1
103
+ } >&2
104
+
105
+ # OS specific support (must be 'true' or 'false').
106
+ cygwin=false
107
+ msys=false
108
+ darwin=false
109
+ nonstop=false
110
+ case "$( uname )" in #(
111
+ CYGWIN* ) cygwin=true ;; #(
112
+ Darwin* ) darwin=true ;; #(
113
+ MSYS* | MINGW* ) msys=true ;; #(
114
+ NONSTOP* ) nonstop=true ;;
115
+ esac
116
+
117
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118
+
119
+
120
+ # Determine the Java command to use to start the JVM.
121
+ if [ -n "$JAVA_HOME" ] ; then
122
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123
+ # IBM's JDK on AIX uses strange locations for the executables
124
+ JAVACMD=$JAVA_HOME/jre/sh/java
125
+ else
126
+ JAVACMD=$JAVA_HOME/bin/java
127
+ fi
128
+ if [ ! -x "$JAVACMD" ] ; then
129
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130
+
131
+ Please set the JAVA_HOME variable in your environment to match the
132
+ location of your Java installation."
133
+ fi
134
+ else
135
+ JAVACMD=java
136
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137
+
138
+ Please set the JAVA_HOME variable in your environment to match the
139
+ location of your Java installation."
140
+ fi
141
+
142
+ # Increase the maximum file descriptors if we can.
143
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144
+ case $MAX_FD in #(
145
+ max*)
146
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147
+ # shellcheck disable=SC3045
148
+ MAX_FD=$( ulimit -H -n ) ||
149
+ warn "Could not query maximum file descriptor limit"
150
+ esac
151
+ case $MAX_FD in #(
152
+ '' | soft) :;; #(
153
+ *)
154
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155
+ # shellcheck disable=SC3045
156
+ ulimit -n "$MAX_FD" ||
157
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
158
+ esac
159
+ fi
160
+
161
+ # Collect all arguments for the java command, stacking in reverse order:
162
+ # * args from the command line
163
+ # * the main class name
164
+ # * -classpath
165
+ # * -D...appname settings
166
+ # * --module-path (only if needed)
167
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
168
+
169
+ # For Cygwin or MSYS, switch paths to Windows format before running java
170
+ if "$cygwin" || "$msys" ; then
171
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
172
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
173
+
174
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
175
+
176
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
177
+ for arg do
178
+ if
179
+ case $arg in #(
180
+ -*) false ;; # don't mess with options #(
181
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
182
+ [ -e "$t" ] ;; #(
183
+ *) false ;;
184
+ esac
185
+ then
186
+ arg=$( cygpath --path --ignore --mixed "$arg" )
187
+ fi
188
+ # Roll the args list around exactly as many times as the number of
189
+ # args, so each arg winds up back in the position where it started, but
190
+ # possibly modified.
191
+ #
192
+ # NB: a `for` loop captures its iteration list before it begins, so
193
+ # changing the positional parameters here affects neither the number of
194
+ # iterations, nor the values presented in `arg`.
195
+ shift # remove old arg
196
+ set -- "$@" "$arg" # push replacement arg
197
+ done
198
+ fi
199
+
200
+ # Collect all arguments for the java command;
201
+ # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202
+ # shell script including quotes and variable substitutions, so put them in
203
+ # double quotes to make sure that they get re-expanded; and
204
+ # * put everything else in single quotes, so that it's not re-expanded.
205
+
206
+ set -- \
207
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
208
+ -classpath "$CLASSPATH" \
209
+ org.gradle.wrapper.GradleWrapperMain \
210
+ "$@"
211
+
212
+ # Stop when "xargs" is not available.
213
+ if ! command -v xargs >/dev/null 2>&1
214
+ then
215
+ die "xargs is not available"
216
+ fi
217
+
218
+ # Use "xargs" to parse quoted args.
219
+ #
220
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
221
+ #
222
+ # In Bash we could simply go:
223
+ #
224
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
225
+ # set -- "${ARGS[@]}" "$@"
226
+ #
227
+ # but POSIX shell has neither arrays nor command substitution, so instead we
228
+ # post-process each arg (as a line of input to sed) to backslash-escape any
229
+ # character that might be a shell metacharacter, then use eval to reverse
230
+ # that process (while maintaining the separation between arguments), and wrap
231
+ # the whole thing up as a single "set" statement.
232
+ #
233
+ # This will of course break if any of these variables contains a newline or
234
+ # an unmatched quote.
235
+ #
236
+
237
+ eval "set -- $(
238
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
239
+ xargs -n1 |
240
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
241
+ tr '\n' ' '
242
+ )" '"$@"'
243
+
244
+ exec "$JAVACMD" "$@"