diff --git a/.gitignore b/.gitignore index 603b14077394cd2294ac6922fe619669630ef3ab..558a79e60bf58d49ed7a402e31d4e99bab7357e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,8 @@ *.iml .gradle /local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml +/.idea +/.kotlin .DS_Store /build /captures diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b33951bcfcfbb0c9b28857f908e6aa51aad392bd..1115bff4ec5d5fcfd7d988093aa905ac88c3e141 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:legacy" +image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:java21" stages: - build diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 1a4f8f7e95454a38e377f6d93d7adfa3e84a79b6..0000000000000000000000000000000000000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -PWA Player \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 88ea3aa1e593800a41855fcc6e3cfbff8e41e169..0000000000000000000000000000000000000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - -
- - - - xmlns:android - - ^$ - - - -
-
- - - - xmlns:.* - - ^$ - - - BY_NAME - -
-
- - - - .*:id - - http://schemas.android.com/apk/res/android - - - -
-
- - - - .*:name - - http://schemas.android.com/apk/res/android - - - -
-
- - - - name - - ^$ - - - -
-
- - - - style - - ^$ - - - -
-
- - - - .* - - ^$ - - - BY_NAME - -
-
- - - - .* - - http://schemas.android.com/apk/res/android - - - ANDROID_ATTRIBUTE_ORDER - -
-
- - - - .* - - .* - - - BY_NAME - -
-
-
-
- - -
-
\ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123c2b23e069e35ed634d687e17f731cc702..0000000000000000000000000000000000000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index ac6b0aec603b76b5b624241b1a099a0a261b1383..0000000000000000000000000000000000000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index a5f05cd8c87d4a72b0242026524cb32639fca7f0..0000000000000000000000000000000000000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 37a750962da6f2b31810e85c8acae1081de7f58c..0000000000000000000000000000000000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460d8b38ac04e3a3224d7c79ef719b1991a9..0000000000000000000000000000000000000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7f4cb416c083d265558da75d457237d671..0000000000000000000000000000000000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 1292993e6ec22157df99b88d6f5d8b9124a00624..aa21bf5cdd9371eda45fdda1366b93527fe6ca66 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,53 +1,82 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' -apply plugin: 'kotlin-kapt' +apply plugin: 'com.google.devtools.ksp' // Manifest version information! -def versionMajor = 0 +def versionMajor = 1 def versionMinor = 0 -def versionPatch = 1 +def versionPatch = 0 android { - compileSdkVersion 29 + compileSdk 35 defaultConfig { applicationId "foundation.e.pwaplayer" - minSdkVersion 24 - targetSdkVersion 29 + minSdk 24 + targetSdk 35 versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 versionName "${versionMajor}.${versionMinor}.${versionPatch}" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } + signingConfigs { + platform { + storeFile = file("${rootDir.path}/keystore/platform.jks") + storePassword = "platform" + keyAlias = "platform" + keyPassword = "platform" + } + } + buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } + + debug { + minifyEnabled = false + signingConfig = signingConfigs.platform + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } + + kotlinOptions { + jvmTarget = "21" + } + + buildFeatures { + buildConfig = true + } + + viewBinding { + enabled = true + } + + namespace = "foundation.e.pwaplayer" } dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.3.0' + implementation 'androidx.core:core-ktx:1.15.0' - def androidx_version = "1.1.0" - implementation "androidx.appcompat:appcompat:$androidx_version" - implementation "androidx.recyclerview:recyclerview:$androidx_version" - implementation "androidx.coordinatorlayout:coordinatorlayout:$androidx_version" - implementation "androidx.preference:preference:$androidx_version" + implementation "androidx.appcompat:appcompat:1.7.0" + implementation "androidx.recyclerview:recyclerview:1.4.0" + implementation "androidx.coordinatorlayout:coordinatorlayout:1.3.0" + implementation "androidx.preference:preference-ktx:1.2.1" - def room_version = "2.2.5" + def room_version = "2.6.1" implementation "androidx.room:room-runtime:$room_version" - kapt "androidx.room:room-compiler:$room_version" - - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:core:1.2.0' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + ksp "androidx.room:room-compiler:$room_version" + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test:core:1.6.1' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } \ No newline at end of file diff --git a/app/src/androidTest/java/foundation/e/pwaplayer/database/PwaTest.kt b/app/src/androidTest/java/foundation/e/pwaplayer/database/PwaTest.kt index 0c6291dd5f413842752f1b1df3fb6a63bd6bc934..fd1ac1a1d30842f3c1dca90fb59b603382ca5c85 100644 --- a/app/src/androidTest/java/foundation/e/pwaplayer/database/PwaTest.kt +++ b/app/src/androidTest/java/foundation/e/pwaplayer/database/PwaTest.kt @@ -4,9 +4,9 @@ import androidx.room.Room import androidx.test.core.app.ApplicationProvider import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import org.hamcrest.Matchers.`is` +import org.hamcrest.CoreMatchers.`is` +import org.hamcrest.MatcherAssert.assertThat import org.junit.After -import org.junit.Assert.assertThat import org.junit.Before import org.junit.Test import org.junit.runner.RunWith @@ -33,7 +33,7 @@ class PwaTest { @Test fun insertAndCount() { assertThat(database.pwaDao().count(), `is`(0)) - val pwa = Pwa(shortcutId = "test-shortcut", url = "https://e.foundation") + val pwa = Pwa(shortcutId = "test-shortcut", url = "https://e.foundation", title = "", iconBlob = byteArrayOf()) database.pwaDao().insert(pwa) assertThat(database.pwaDao().count(), `is`(1)) } diff --git a/app/src/androidTest/java/foundation/e/pwaplayer/provider/PwaProviderTest.kt b/app/src/androidTest/java/foundation/e/pwaplayer/provider/PwaProviderTest.kt index 03c3b5f81df5fe2f82d32bde22589e2bba07a63f..2366bff2435bfeabdb49f3fedbef93c4f624aaf4 100644 --- a/app/src/androidTest/java/foundation/e/pwaplayer/provider/PwaProviderTest.kt +++ b/app/src/androidTest/java/foundation/e/pwaplayer/provider/PwaProviderTest.kt @@ -3,12 +3,13 @@ package foundation.e.pwaplayer.provider import android.content.ContentResolver import android.content.Context import android.database.Cursor +import androidx.core.net.toUri import androidx.test.core.app.ApplicationProvider import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import org.hamcrest.CoreMatchers.notNullValue +import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.Matchers.`is` -import org.junit.Assert.assertThat import org.junit.Before import org.junit.Test import org.junit.runner.RunWith @@ -22,21 +23,20 @@ class PwaProviderTest { @Before fun setUp() { val context: Context = ApplicationProvider.getApplicationContext() - //SampleDatabase.switchToInMemory(context) contentResolver = context.contentResolver } @Test fun cheese_initiallyEmpty() { val cursor: Cursor? = contentResolver.query( - URI_PWA, - arrayOf("url"), + "content://foundation.e.pwaplayer.provider/pwa".toUri(), + arrayOf("url"), null, null, null ) assertThat(cursor, notNullValue()) assertThat(cursor!!.count, `is`(0)) - cursor!!.close() + cursor.close() } } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index af5e84ee9267d7bdf3977e03173a2d6c745a0d0f..86eef4177b91526cce6456d11b99ab7540cde077 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ - + + @@ -25,7 +25,8 @@ android:exported="true" android:permission="foundation.e.pwaplayer.provider.READ_WRITE" /> - + diff --git a/app/src/main/java/foundation/e/pwaplayer/database/Pwa.kt b/app/src/main/java/foundation/e/pwaplayer/database/Pwa.kt index 2c313bea5f11a87af0c71bf12df0c847b4831133..1913fbd901a705afcc74af36202a4311dac33e74 100644 --- a/app/src/main/java/foundation/e/pwaplayer/database/Pwa.kt +++ b/app/src/main/java/foundation/e/pwaplayer/database/Pwa.kt @@ -56,11 +56,11 @@ data class Pwa( } fun Cursor.mapToPwa(): Pwa { - val url = this.getString(this.getColumnIndex(PwaConstants.URL)) - val shortcutId = this.getString(this.getColumnIndex(PwaConstants.SHORTCUT_ID)) - val id = this.getLong(this.getColumnIndex(PwaConstants.ID)) - val title = this.getString(this.getColumnIndex(PwaConstants.TITLE)) - val icon = this.getBlob(this.getColumnIndex(PwaConstants.ICON)) + val url = this.getString(this.getColumnIndexOrThrow(PwaConstants.URL)) + val shortcutId = this.getString(this.getColumnIndexOrThrow(PwaConstants.SHORTCUT_ID)) + val id = this.getLong(this.getColumnIndexOrThrow(PwaConstants.ID)) + val title = this.getString(this.getColumnIndexOrThrow(PwaConstants.TITLE)) + val icon = this.getBlob(this.getColumnIndexOrThrow(PwaConstants.ICON)) return Pwa(id, shortcutId, url, title, icon) } diff --git a/app/src/main/java/foundation/e/pwaplayer/provider/PwaConstants.kt b/app/src/main/java/foundation/e/pwaplayer/provider/PwaConstants.kt index 72dae729bd7bd3e7ef46a0f66db6ded4a06a5190..fc40bb800e934104cb043a26ecb5c74da2071bf7 100644 --- a/app/src/main/java/foundation/e/pwaplayer/provider/PwaConstants.kt +++ b/app/src/main/java/foundation/e/pwaplayer/provider/PwaConstants.kt @@ -1,7 +1,7 @@ package foundation.e.pwaplayer.provider -import android.net.Uri import android.provider.BaseColumns._ID +import androidx.core.net.toUri class PwaConstants { companion object { @@ -12,6 +12,6 @@ class PwaConstants { const val ICON = "icon" const val TABLE_NAME = "pwa" - val CONTENT_URI = Uri.parse("content://$AUTHORITY/$TABLE_NAME") + val CONTENT_URI = "content://$AUTHORITY/$TABLE_NAME".toUri() } } \ No newline at end of file diff --git a/app/src/main/java/foundation/e/pwaplayer/ui/about/AboutActivity.kt b/app/src/main/java/foundation/e/pwaplayer/ui/about/AboutActivity.kt index 25fd2363d180391537b77bd1fd9926b1b80e3a5b..3d6b3f0235f45afcada6fe3e55814f50630b8ff2 100644 --- a/app/src/main/java/foundation/e/pwaplayer/ui/about/AboutActivity.kt +++ b/app/src/main/java/foundation/e/pwaplayer/ui/about/AboutActivity.kt @@ -2,20 +2,22 @@ package foundation.e.pwaplayer.ui.about import androidx.appcompat.app.AppCompatActivity import android.os.Bundle -import androidx.core.app.NavUtils import foundation.e.pwaplayer.R -import kotlinx.android.synthetic.main.activity_about.* +import foundation.e.pwaplayer.databinding.ActivityAboutBinding class AboutActivity : AppCompatActivity() { + private lateinit var binding: ActivityAboutBinding + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + binding = ActivityAboutBinding.inflate(layoutInflater) setContentView(R.layout.activity_about) title = getString(R.string.about) - setSupportActionBar(toolbar) + setSupportActionBar(binding.toolbar) supportActionBar?.setDisplayHomeAsUpEnabled(true) supportActionBar?.setDisplayShowHomeEnabled(true) - toolbar.setNavigationOnClickListener { + binding.toolbar.setNavigationOnClickListener { finish() } diff --git a/app/src/main/java/foundation/e/pwaplayer/ui/home/HomeActivity.kt b/app/src/main/java/foundation/e/pwaplayer/ui/home/HomeActivity.kt index e0351e3b5f6fa29ec429c8d6ffbfd5ea2f4729a5..ebde248c6479d1b18e8061771238cda9f5004b11 100644 --- a/app/src/main/java/foundation/e/pwaplayer/ui/home/HomeActivity.kt +++ b/app/src/main/java/foundation/e/pwaplayer/ui/home/HomeActivity.kt @@ -7,7 +7,6 @@ import android.os.Handler import android.os.HandlerThread import android.os.Looper import android.provider.Settings -import android.util.Log import android.view.Menu import android.view.MenuInflater import android.view.MenuItem @@ -17,9 +16,9 @@ import androidx.recyclerview.widget.LinearLayoutManager import foundation.e.pwaplayer.R import foundation.e.pwaplayer.database.Pwa import foundation.e.pwaplayer.database.mapToPwa +import foundation.e.pwaplayer.databinding.ActivityHomeBinding import foundation.e.pwaplayer.provider.PwaConstants.Companion.CONTENT_URI import foundation.e.pwaplayer.ui.about.AboutActivity -import kotlinx.android.synthetic.main.activity_home.* private const val TAG = "HomeActivity" @@ -33,24 +32,27 @@ class HomeActivity : AppCompatActivity() { private lateinit var workerHandler: Handler private val uiHandler = Handler(Looper.getMainLooper()) + private lateinit var binding: ActivityHomeBinding + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + binding = ActivityHomeBinding.inflate(layoutInflater) setContentView(R.layout.activity_home) - setSupportActionBar(toolbar) + setSupportActionBar(binding.toolbar) title = resources.getString(R.string.installed_pwas) val linearLayoutManager = LinearLayoutManager(this) - pwaRecyclerView.layoutManager = linearLayoutManager - pwaRecyclerView.setHasFixedSize(true) - pwaRecyclerView.addItemDecoration( + binding.pwaRecyclerView.layoutManager = linearLayoutManager + binding.pwaRecyclerView.setHasFixedSize(true) + binding.pwaRecyclerView.addItemDecoration( DividerItemDecoration( this, DividerItemDecoration.VERTICAL ) ) - pwaRecyclerView.adapter = adapter + binding.pwaRecyclerView.adapter = adapter workerThread.start() workerHandler = Handler(workerThread.looper) diff --git a/app/src/main/java/foundation/e/pwaplayer/ui/player/PwaActivity.kt b/app/src/main/java/foundation/e/pwaplayer/ui/player/PwaActivity.kt index 00264da0a3f6ed2c22a12ba69aea547a10a5d105..d1dccc2ca2e8f15f13fb3cef015118ab32d8e7f2 100644 --- a/app/src/main/java/foundation/e/pwaplayer/ui/player/PwaActivity.kt +++ b/app/src/main/java/foundation/e/pwaplayer/ui/player/PwaActivity.kt @@ -105,12 +105,14 @@ class PwaActivity : AppCompatActivity() { permissions: Array, grantResults: IntArray ) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults) + when (requestCode) { PwaWebChromeClient.REQUEST_LOCATION_PERMISSION -> { - if (grantResults.size > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { - pwaWebChromeClient!!.locationPermissionGranted() + if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + pwaWebChromeClient?.locationPermissionGranted() } else { - pwaWebChromeClient!!.locationPermissionDenied() + pwaWebChromeClient?.locationPermissionDenied() } } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 74377935e87bacb3e59253f82c27009b67fc9e3d..327cdd29963ed5c628be66318411e1eb59a5fd97 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - PWA Player + PWA Player %s needs to access location permission to show weather in your location. Permission is not granted @@ -7,22 +7,25 @@ Settings About + build_version + license + authors + source_code + privacy_policy + terms_of_services + App name - build_version Build version - license License - authors Authors - source_code Source code - privacy_policy Privacy policy - terms_of_services Terms of services - GNU GENERAL PUBLIC LICENSE - https://gitlab.e.foundation/e/apps/pwa-player/ - https://gitlab.e.foundation/e/apps/pwa-player/-/blob/master/LICENSE - https://gitlab.e.foundation/e/apps/pwa-player/-/blob/master/AUTHORS - https://e.foundation/legal-notice-privacy/ + + GNU GENERAL PUBLIC LICENSE + + https://gitlab.e.foundation/e/os/pwa-player/ + https://gitlab.e.foundation/e/os/pwa-player/-/blob/master/LICENSE + https://gitlab.e.foundation/e/os/pwa-player/-/blob/master/AUTHORS + https://e.foundation/legal-notice-privacy/ \ No newline at end of file diff --git a/app/src/test/java/foundation/e/pwaplayer/ExampleUnitTest.kt b/app/src/test/java/foundation/e/pwaplayer/ExampleUnitTest.kt index 072876d7a8440c68039884558392fa44c325c54b..f618cfda815ab1791cc13e5d20728cb5503d99bf 100644 --- a/app/src/test/java/foundation/e/pwaplayer/ExampleUnitTest.kt +++ b/app/src/test/java/foundation/e/pwaplayer/ExampleUnitTest.kt @@ -2,7 +2,7 @@ package foundation.e.pwaplayer import org.junit.Test -import org.junit.Assert.* +import org.junit.Assert.assertEquals /** * Example local unit test, which will execute on the development machine (host). diff --git a/build.gradle b/build.gradle index 71b78e029513e26bab1229064e6dbcdb29727093..9686321127484225178c97a1edb5a8e69610e2db 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.3.72" + ext.kotlin_version = "2.1.0" repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:4.0.0" + classpath 'com.android.tools.build:gradle:8.9.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong @@ -14,13 +14,17 @@ buildscript { } } +plugins { + id 'com.google.devtools.ksp' version '2.1.0-1.0.29' apply false +} + allprojects { repositories { google() - jcenter() + mavenCentral() } } -task clean(type: Delete) { +tasks.register('clean', Delete) { delete rootProject.buildDir } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f6b961fd5a86aa5fbfe90f707c3138408be7c718..e708b1c023ec8b20f512888fe07c5bd3ff77bb8f 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 05edfadb3d05d9e40dd17b55df81ae682b081ada..e87a2f19cc2eefddec0480850dc14939af0ff2ab 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jun 16 16:28:16 IST 2020 +#Thu Apr 03 16:23:55 IST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/gradlew b/gradlew index cccdd3d517fc5249beaefa600691cf150f2fa3e6..4f906e0c811fc9e230eb44819f509cd0627f2600 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -66,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -109,10 +126,11 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath @@ -138,19 +156,19 @@ if $cygwin ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -159,14 +177,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index e95643d6a2ca62258464e83c72f5156dc941c609..ac1b06f93825db68fb0c0b5150917f340eaa5d02 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,28 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/keystore/platform.jks b/keystore/platform.jks new file mode 100644 index 0000000000000000000000000000000000000000..b778840542e79c048bcf570aa960243eeb9b9d53 Binary files /dev/null and b/keystore/platform.jks differ