initial
This commit is contained in:
commit
6f3140de8a
28 files changed
+755
No files matched your search
@@ -0,0 +1,6 @@
|
||||
*.iml
|
||||
/.gradle/**/*
|
||||
/.idea/**/*
|
||||
/local.properties
|
||||
/app/build/**/*
|
||||
/build
|
||||
@@ -0,0 +1,44 @@
|
||||
# Yiddish Keyboard (free like beer)
|
||||
|
||||
New yiddish has some more letters than hebrew. Some other open source keyboards (dec 2018)
|
||||
did not have these letters. Some non payment `le goog` store app have it ... but not FOSS.
|
||||
The original `le goog` android has a yiddish layout, but linage OS not.
|
||||
|
||||
You can get a signed APK from here (Android 4.1+): [APK](https://raw.githubusercontent.com/no-go/YiddishKeyboard/master/app/release/click.dummer.yidkey.apk)
|
||||
|
||||
## Screenshot
|
||||
|
||||

|
||||
|
||||
|
||||
## Privacy Policy
|
||||
|
||||
### Personal information.
|
||||
|
||||
Personal information is data that can be used to uniquely identify or contact a single person. I DO NOT collect, transmit, store or use any personal information while you use this app.
|
||||
|
||||
### Non-Personal information.
|
||||
|
||||
I DO NOT collect non-personal information like user's behavior:
|
||||
|
||||
- to solve App problems
|
||||
- to show personalized ads
|
||||
|
||||
The google play store collect non-personal information such as the data of install (country and equipment).
|
||||
|
||||
### Privacy Questions.
|
||||
|
||||
If you have any questions or concerns about my Privacy Policy or data processing, please contact me.
|
||||
|
||||
|
||||
## License - My Android Code
|
||||
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information: http://unlicense.org
|
||||
@@ -0,0 +1 @@
|
||||
/build
|
||||
@@ -0,0 +1,30 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
defaultConfig {
|
||||
applicationId "click.dummer.yidkey"
|
||||
minSdkVersion 16
|
||||
//upload similar to offlineTranslator
|
||||
targetSdkVersion 26
|
||||
versionCode 11
|
||||
versionName "1.1"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all {
|
||||
outputFileName = "${variant.applicationId}.apk"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":11,"versionName":"1.1","enabled":true,"outputFile":"click.dummer.yidkey.apk","fullName":"release","baseName":"release"},"path":"click.dummer.yidkey.apk","properties":{}}]
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="click.dummer.yidkey.uglykeyb">
|
||||
|
||||
<application
|
||||
android:name="click.dummer.yidkey.Application"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<service
|
||||
android:name="click.dummer.yidkey.MyInputMethodService"
|
||||
android:label="@string/app_name"
|
||||
android:permission="android.permission.BIND_INPUT_METHOD">
|
||||
<intent-filter>
|
||||
<action android:name="android.view.InputMethod" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.view.im"
|
||||
android:resource="@xml/method" />
|
||||
</service>
|
||||
|
||||
<activity android:name="click.dummer.yidkey.MainActivity" android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,9 @@
|
||||
package click.dummer.yidkey;
|
||||
|
||||
public final class Application extends android.app.Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
//FontsOverride.setDefaultFont(this, "DEFAULT", "fonts/c64pro_mono.ttf");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package click.dummer.yidkey;
|
||||
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import click.dummer.yidkey.uglykeyb.R;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
try {
|
||||
ActionBar ab = getSupportActionBar();
|
||||
if (ab != null) {
|
||||
ab.setDisplayShowHomeEnabled(true);
|
||||
ab.setHomeButtonEnabled(true);
|
||||
ab.setDisplayUseLogoEnabled(true);
|
||||
ab.setLogo(R.mipmap.ic_launcher);
|
||||
ab.setTitle(" " + getString(R.string.app_name));
|
||||
ab.setElevation(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package click.dummer.yidkey;
|
||||
|
||||
import android.inputmethodservice.InputMethodService;
|
||||
import android.inputmethodservice.Keyboard;
|
||||
import android.inputmethodservice.KeyboardView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import click.dummer.yidkey.uglykeyb.R;
|
||||
|
||||
public class MyInputMethodService extends InputMethodService implements KeyboardView.OnKeyboardActionListener {
|
||||
|
||||
@Override
|
||||
public View onCreateInputView() {
|
||||
// get the KeyboardView and add our Keyboard layout to it
|
||||
KeyboardView keyboardView = (KeyboardView) getLayoutInflater().inflate(R.layout.keyboard_view, null);
|
||||
Keyboard keyboard = new Keyboard(this, R.xml.pad);
|
||||
List<Keyboard.Key> keys = keyboard.getKeys();
|
||||
|
||||
for (Keyboard.Key key : keys) {
|
||||
if (key.codes[0] == -5) {
|
||||
;
|
||||
}
|
||||
}
|
||||
keyboardView.setKeyboard(keyboard);
|
||||
keyboardView.setOnKeyboardActionListener(this);
|
||||
return keyboardView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKey(int primaryCode, int[] keyCodes) {
|
||||
InputConnection inputConnection = getCurrentInputConnection();
|
||||
|
||||
if (inputConnection != null) {
|
||||
switch(primaryCode) {
|
||||
case Keyboard.KEYCODE_DELETE :
|
||||
CharSequence selectedText = inputConnection.getSelectedText(0);
|
||||
|
||||
if (TextUtils.isEmpty(selectedText)) {
|
||||
inputConnection.deleteSurroundingText(1, 0);
|
||||
} else {
|
||||
inputConnection.commitText("", 1);
|
||||
}
|
||||
|
||||
break;
|
||||
case -10:
|
||||
inputConnection.commitText("שׂ", 1);
|
||||
break;
|
||||
case -11:
|
||||
inputConnection.commitText("יִ", 1);
|
||||
break;
|
||||
case -12:
|
||||
inputConnection.commitText("אַ", 1);
|
||||
break;
|
||||
case -13:
|
||||
inputConnection.commitText("אָ", 1);
|
||||
break;
|
||||
case -15:
|
||||
inputConnection.commitText("כּ", 1);
|
||||
break;
|
||||
case -18:
|
||||
inputConnection.commitText("תּ", 1);
|
||||
break;
|
||||
case -14:
|
||||
inputConnection.commitText("בֿ", 1);
|
||||
break;
|
||||
case -16:
|
||||
inputConnection.commitText("פּ", 1);
|
||||
break;
|
||||
case -17:
|
||||
inputConnection.commitText("פֿ", 1);
|
||||
break;
|
||||
case -19:
|
||||
inputConnection.commitText("וּ", 1);
|
||||
break;
|
||||
case -20:
|
||||
inputConnection.commitText("ױ", 1);
|
||||
break;
|
||||
case -21:
|
||||
inputConnection.commitText("ײַ", 1);
|
||||
break;
|
||||
|
||||
case Keyboard.KEYCODE_DONE:
|
||||
inputConnection.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER));
|
||||
break;
|
||||
default :
|
||||
char code = (char) primaryCode;
|
||||
inputConnection.commitText(String.valueOf(code), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPress(int primaryCode) { }
|
||||
|
||||
@Override
|
||||
public void onRelease(int primaryCode) { }
|
||||
|
||||
@Override
|
||||
public void onText(CharSequence text) { }
|
||||
|
||||
@Override
|
||||
public void swipeLeft() { }
|
||||
|
||||
@Override
|
||||
public void swipeRight() { }
|
||||
|
||||
@Override
|
||||
public void swipeDown() { }
|
||||
|
||||
@Override
|
||||
public void swipeUp() { }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/colorOther"
|
||||
tools:context="click.dummer.yidkey.MainActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:src="@mipmap/layout" />
|
||||
|
||||
<EditText
|
||||
android:text="@string/explain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:background="@android:color/white"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="30sp">
|
||||
</TextView>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.inputmethodservice.KeyboardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/keyboard_view"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/colorOther"
|
||||
android:keyBackground="@color/colorPrimaryDark"
|
||||
android:keyPreviewHeight="0dp"
|
||||
android:keyTextColor="@color/colorAccent"
|
||||
android:layout_height="wrap_content"
|
||||
android:keyTextSize="18dp"
|
||||
android:keyPreviewLayout="@layout/key_preview"
|
||||
android:padding="1dp"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
</android.inputmethodservice.KeyboardView>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 234 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#948867</color>
|
||||
<color name="colorPrimaryDark">#3146a1</color>
|
||||
<color name="colorAccent">#fffcf1</color>
|
||||
<color name="colorOther">#dfdfdf</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">YidKey</string>
|
||||
<string name="explain">For some letters you have to type a key two or three times.</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,11 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<input-method
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<subtype
|
||||
android:imeSubtypeMode="keyboard"/>
|
||||
|
||||
</input-method>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:keyWidth="10%p"
|
||||
android:keyHeight="8%p"
|
||||
android:verticalGap="1dp"
|
||||
android:horizontalGap="1dp" >
|
||||
|
||||
<Row>
|
||||
<Key android:codes="49,33,63" android:keyLabel="1!?" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="50,64,47" android:keyLabel="2@/"/>
|
||||
<Key android:codes="51,35,8362" android:keyLabel="3#₪"/>
|
||||
<Key android:codes="52,43,60" android:keyLabel="4+<"/>
|
||||
<Key android:codes="53,45,62" android:keyLabel="5->"/>
|
||||
<Key android:codes="54,46,58" android:keyLabel="6.:"/>
|
||||
<Key android:codes="55,44,92,42" android:keyLabel="7,\\*" />
|
||||
<Key android:codes="56,37,34" android:keyLabel='8%"' />
|
||||
<Key android:codes="57,40,39" android:keyLabel="9('"/>
|
||||
<Key android:codes="48,41,61" android:keyLabel="0)=" android:keyEdgeFlags="right"/>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Key android:codes="1511" android:keyLabel="ק" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="1496" android:keyLabel="ט" />
|
||||
<Key android:codes="1506" android:keyLabel="ע" />
|
||||
<Key android:codes="1512" android:keyLabel="ר" />
|
||||
<Key android:codes="1514,-18" android:keyLabel="ת" />
|
||||
<Key android:codes="1497,1522,-11" android:keyLabel="ייִ" />
|
||||
<Key android:codes="1493,1520,1521" android:keyLabel="ו" />
|
||||
<Key android:codes="1504,1503" android:keyLabel="נן" />
|
||||
<Key android:codes="1505" android:keyLabel="ס" />
|
||||
<Key android:codes="1508,-16" android:keyLabel="פ" android:keyEdgeFlags="right"/>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Key android:codes="1488,-13" android:keyLabel="א" android:keyWidth="12%p" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="1513,-10" android:keyLabel="ש" android:keyWidth="11%p" />
|
||||
<Key android:codes="1491" android:keyLabel="ד" />
|
||||
<Key android:codes="1507" android:keyLabel="ף" />
|
||||
<Key android:codes="1490" android:keyLabel="ג" />
|
||||
<Key android:codes="1492" android:keyLabel="ה" />
|
||||
<Key android:codes="1499,1498" android:keyWidth="12%p" android:keyLabel="כך" />
|
||||
<Key android:codes="1500" android:keyLabel="ל" android:keyWidth="11%p" />
|
||||
<Key android:codes="-17" android:keyLabel="פֿ" android:keyWidth="13%p" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Key android:codes="1494" android:keyLabel="ז" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="1495" android:keyLabel="ח" />
|
||||
<Key android:codes="1510,1509" android:keyLabel="צץ" />
|
||||
<Key android:codes="-19" android:keyLabel="וּ" />
|
||||
<Key android:codes="1489,-14" android:keyLabel="ב" />
|
||||
<Key android:codes="-15" android:keyLabel="כּ" />
|
||||
<Key android:codes="1502" android:keyLabel="מ" />
|
||||
<Key android:codes="1501" android:keyLabel="ם" />
|
||||
<Key android:keyWidth="18%p" android:codes="-5" android:keyLabel="DEL" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Key android:codes="-12" android:keyLabel="אַ" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="-20" android:keyLabel="ױ" />
|
||||
<Key android:codes="-21" android:keyLabel="ײַ" />
|
||||
|
||||
<Key android:codes="32"
|
||||
android:keyLabel=" "
|
||||
android:keyWidth="28%p" />
|
||||
|
||||
<Key android:codes="1470" android:keyLabel="־"/>
|
||||
<Key android:codes="95,123,125" android:keyLabel="_{}"/>
|
||||
|
||||
<Key android:codes="-4"
|
||||
android:keyLabel="FINE"
|
||||
android:keyWidth="21%p"
|
||||
android:keyEdgeFlags="right"/>
|
||||
</Row>
|
||||
|
||||
</Keyboard>
|
||||
@@ -0,0 +1,27 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
||||
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+6
@@ -0,0 +1,6 @@
|
||||
#Fri Dec 07 00:54:35 CET 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
|
||||
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
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=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
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
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
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
|
||||
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
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((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" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
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" "$@"
|
||||
Vendored
+84
@@ -0,0 +1,84 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@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=
|
||||
|
||||
@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
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
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%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1 @@
|
||||
include ':app'
|
||||
Reference in new issue
Block a user