Skip to content

Commit b44d86b

Browse files
committed
gradlefy
1 parent 2b2c8ae commit b44d86b

File tree

9 files changed

+370
-37
lines changed

9 files changed

+370
-37
lines changed

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
*/bin
2-
*/gen
3-
*/build-private.properties
1+
bin
2+
gen
3+
build-private.properties
4+
build
5+
.idea
6+
.gradle
7+
*.iml
8+
local.properties

Safe/AndroidManifest.xml

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="org.openintents.safe"
4-
android:installLocation="auto"
5-
android:versionName="1.4.2-alpha"
6-
android:versionCode="30">
4+
android:installLocation="auto">
75
<!-- History:
86
* * * UPDATE ATRACKDOG METADATA BELOW FOR RELEASE CANDIDATES * * *
97
1.4.2-alpha [30]: 2013-05-05
@@ -20,14 +18,14 @@
2018
1.2.7 [18]: 2011-01-25
2119
1.2.6 [17]: 2011-01-20
2220
1.2.5 [15]: 2010-04-03
23-
1.2.4 [13]: 2009-11-27
24-
1.2.3 [12]: 2009-11-23
25-
1.2.2 [11]: 2009-10-29
26-
1.2.1 [10]: 2009-10-23
27-
1.2.0 [9]: 2009-08-22
28-
1.1.1 [8]: 2009-05-30
29-
1.1.0 [6]: 2009-03-17
30-
1.0.0 [4]: 2009-02-02
21+
1.2.4 [13]: 2009-11-27
22+
1.2.3 [12]: 2009-11-23
23+
1.2.2 [11]: 2009-10-29
24+
1.2.1 [10]: 2009-10-23
25+
1.2.0 [9]: 2009-08-22
26+
1.1.1 [8]: 2009-05-30
27+
1.1.0 [6]: 2009-03-17
28+
1.0.0 [4]: 2009-02-02
3129
-->
3230

3331
<uses-sdk
@@ -55,17 +53,17 @@
5553

5654
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
5755

58-
<application android:icon="@drawable/ic_launcher_safe" android:allowClearUserData="true" android:label="@string/app_name">
59-
60-
<!-- aTrackDog metadata -->
61-
<meta-data android:name="com.a0soft.gphone.aTrackDog.testVersion"
62-
android:value="26" />
63-
64-
<!-- OI About metadata -->
56+
<application android:icon="@drawable/ic_launcher_safe" android:allowClearUserData="true" android:label="@string/app_name">
57+
58+
<!-- aTrackDog metadata -->
59+
<meta-data android:name="com.a0soft.gphone.aTrackDog.testVersion"
60+
android:value="26" />
61+
62+
<!-- OI About metadata -->
6563
<meta-data android:name="org.openintents.about"
6664
android:resource="@xml/about" />
6765

68-
<activity class=".Safe" android:name="Safe" android:label="@string/app_name"
66+
<activity class=".Safe" android:name="Safe" android:label="@string/app_name"
6967
android:theme="@android:style/Theme.Translucent.NoTitleBar">
7068
</activity>
7169
<!-- FrontDoor was the original main activity prior to 1.2.4. Now it
@@ -83,20 +81,20 @@
8381
<action android:name="org.openintents.action.ENCRYPT" />
8482
<category android:name="android.intent.category.DEFAULT" />
8583
</intent-filter>
86-
<intent-filter android:label="@string/intent_encrypt">
87-
<action android:name="org.openintents.action.ENCRYPT" />
88-
<category android:name="android.intent.category.DEFAULT" />
89-
<data android:scheme="file" />
90-
</intent-filter>
84+
<intent-filter android:label="@string/intent_encrypt">
85+
<action android:name="org.openintents.action.ENCRYPT" />
86+
<category android:name="android.intent.category.DEFAULT" />
87+
<data android:scheme="file" />
88+
</intent-filter>
9189
<intent-filter android:label="@string/intent_decrypt">
9290
<action android:name="org.openintents.action.DECRYPT" />
9391
<category android:name="android.intent.category.DEFAULT" />
9492
</intent-filter>
95-
<intent-filter android:label="@string/intent_decrypt">
96-
<action android:name="org.openintents.action.DECRYPT" />
97-
<category android:name="android.intent.category.DEFAULT" />
98-
<data android:scheme="file" />
99-
</intent-filter>
93+
<intent-filter android:label="@string/intent_decrypt">
94+
<action android:name="org.openintents.action.DECRYPT" />
95+
<category android:name="android.intent.category.DEFAULT" />
96+
<data android:scheme="file" />
97+
</intent-filter>
10098
<intent-filter android:label="@string/intent_get_password">
10199
<action android:name="org.openintents.action.GET_PASSWORD" />
102100
<category android:name="android.intent.category.DEFAULT" />
@@ -114,13 +112,13 @@
114112
<activity class=".PassEdit" android:name="PassEdit" android:label="@string/app_name" />
115113
<activity class=".CategoryList" android:name="CategoryList" android:label="@string/app_name" />
116114
<activity class=".Search" android:name="Search" android:label="@string/app_name" />
117-
<activity class=".AskPassword" android:name="AskPassword" android:label="@string/app_name" android:windowSoftInputMode="adjustPan"/>
115+
<activity class=".AskPassword" android:name="AskPassword" android:label="@string/app_name" android:windowSoftInputMode="adjustPan"/>
118116
<activity class=".Help" android:name="Help" android:label="@string/app_name" />
119117
<activity class=".ChangePass" android:name="ChangePass" android:label="@string/app_name" />
120118
<activity class=".Restore" android:name="Restore" android:label="@string/app_name" />
121119
<activity class=".Preferences" android:name="Preferences" android:label="@string/app_name" />
122-
<activity class=".LogOffActivity" android:name="LogOffActivity" android:label="@string/app_name" />
123-
<activity android:name=".dialog.DialogHostingActivity" android:label="@string/app_name"
120+
<activity class=".LogOffActivity" android:name="LogOffActivity" android:label="@string/app_name" />
121+
<activity android:name=".dialog.DialogHostingActivity" android:label="@string/app_name"
124122
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
125123
<activity class=".RestoreFirstTime" android:name="RestoreFirstTime"
126124
android:label="@string/backup_file_found_label" />
@@ -135,9 +133,9 @@
135133

136134
<service
137135
android:enabled="true"
138-
android:name=".service.AutoLockService"/>
136+
android:name=".service.AutoLockService"/>
139137

140-
<provider android:name=".CryptoContentProvider" android:authorities="org.openintents.safe"></provider>
138+
<provider android:name=".CryptoContentProvider" android:authorities="org.openintents.safe"></provider>
141139
<provider android:name="org.openintents.safe.backup.MyBackupPro"
142140
android:authorities="org.openintents.safe.backup.MyBackupPro"
143141
/>

Safe/build.gradle

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
apply plugin: 'com.android.application'
2+
3+
dependencies {
4+
compile fileTree(dir: 'libs', include: '*.jar')
5+
compile 'org.openintents:DistributionLibrary:1.0.+'
6+
}
7+
8+
android {
9+
compileSdkVersion 20
10+
buildToolsVersion "20.0.0"
11+
12+
defaultConfig {
13+
applicationId "org.openintents.safe"
14+
versionCode 30
15+
versionName "1.4.2-alpha"
16+
minSdkVersion 4
17+
targetSdkVersion 20
18+
}
19+
20+
sourceSets {
21+
main {
22+
manifest.srcFile 'AndroidManifest.xml'
23+
java.srcDirs = ['src']
24+
resources.srcDirs = ['src']
25+
res.srcDirs = ['res']
26+
assets.srcDirs = ['assets']
27+
}
28+
29+
// Move the tests to tests/java, tests/res, etc...
30+
instrumentTest.setRoot('tests')
31+
32+
// Move the build types to build-types/<type>
33+
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
34+
// This moves them out of them default location under src/<type>/... which would
35+
// conflict with src/ being used by the main source set.
36+
// Adding new build types or product flavors should be accompanied
37+
// by a similar customization.
38+
debug.setRoot('build-types/debug')
39+
release.setRoot('build-types/release')
40+
}
41+
}

build.gradle

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
}
5+
dependencies {
6+
classpath 'com.android.tools.build:gradle:0.13.0'
7+
}
8+
}
9+
10+
subprojects {
11+
repositories {
12+
mavenCentral()
13+
maven {
14+
url '../../repo'
15+
}
16+
17+
}
18+
19+
apply plugin: 'findbugs'
20+
findbugs {
21+
ignoreFailures = true
22+
}
23+
24+
apply plugin: 'pmd'
25+
pmd {
26+
ignoreFailures = true
27+
}
28+
}

gradle/wrapper/gradle-wrapper.jar

49.8 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Sat Oct 04 12:02:13 CEST 2014
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip

gradlew

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
#!/usr/bin/env bash
2+
3+
##############################################################################
4+
##
5+
## Gradle start up script for UN*X
6+
##
7+
##############################################################################
8+
9+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10+
DEFAULT_JVM_OPTS=""
11+
12+
APP_NAME="Gradle"
13+
APP_BASE_NAME=`basename "$0"`
14+
15+
# Use the maximum available, or set MAX_FD != -1 to use that value.
16+
MAX_FD="maximum"
17+
18+
warn ( ) {
19+
echo "$*"
20+
}
21+
22+
die ( ) {
23+
echo
24+
echo "$*"
25+
echo
26+
exit 1
27+
}
28+
29+
# OS specific support (must be 'true' or 'false').
30+
cygwin=false
31+
msys=false
32+
darwin=false
33+
case "`uname`" in
34+
CYGWIN* )
35+
cygwin=true
36+
;;
37+
Darwin* )
38+
darwin=true
39+
;;
40+
MINGW* )
41+
msys=true
42+
;;
43+
esac
44+
45+
# For Cygwin, ensure paths are in UNIX format before anything is touched.
46+
if $cygwin ; then
47+
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48+
fi
49+
50+
# Attempt to set APP_HOME
51+
# Resolve links: $0 may be a link
52+
PRG="$0"
53+
# Need this for relative symlinks.
54+
while [ -h "$PRG" ] ; do
55+
ls=`ls -ld "$PRG"`
56+
link=`expr "$ls" : '.*-> \(.*\)$'`
57+
if expr "$link" : '/.*' > /dev/null; then
58+
PRG="$link"
59+
else
60+
PRG=`dirname "$PRG"`"/$link"
61+
fi
62+
done
63+
SAVED="`pwd`"
64+
cd "`dirname \"$PRG\"`/" >&-
65+
APP_HOME="`pwd -P`"
66+
cd "$SAVED" >&-
67+
68+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69+
70+
# Determine the Java command to use to start the JVM.
71+
if [ -n "$JAVA_HOME" ] ; then
72+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73+
# IBM's JDK on AIX uses strange locations for the executables
74+
JAVACMD="$JAVA_HOME/jre/sh/java"
75+
else
76+
JAVACMD="$JAVA_HOME/bin/java"
77+
fi
78+
if [ ! -x "$JAVACMD" ] ; then
79+
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80+
81+
Please set the JAVA_HOME variable in your environment to match the
82+
location of your Java installation."
83+
fi
84+
else
85+
JAVACMD="java"
86+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87+
88+
Please set the JAVA_HOME variable in your environment to match the
89+
location of your Java installation."
90+
fi
91+
92+
# Increase the maximum file descriptors if we can.
93+
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94+
MAX_FD_LIMIT=`ulimit -H -n`
95+
if [ $? -eq 0 ] ; then
96+
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97+
MAX_FD="$MAX_FD_LIMIT"
98+
fi
99+
ulimit -n $MAX_FD
100+
if [ $? -ne 0 ] ; then
101+
warn "Could not set maximum file descriptor limit: $MAX_FD"
102+
fi
103+
else
104+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105+
fi
106+
fi
107+
108+
# For Darwin, add options to specify how the application appears in the dock
109+
if $darwin; then
110+
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111+
fi
112+
113+
# For Cygwin, switch paths to Windows format before running java
114+
if $cygwin ; then
115+
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116+
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117+
118+
# We build the pattern for arguments to be converted via cygpath
119+
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120+
SEP=""
121+
for dir in $ROOTDIRSRAW ; do
122+
ROOTDIRS="$ROOTDIRS$SEP$dir"
123+
SEP="|"
124+
done
125+
OURCYGPATTERN="(^($ROOTDIRS))"
126+
# Add a user-defined pattern to the cygpath arguments
127+
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128+
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129+
fi
130+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
131+
i=0
132+
for arg in "$@" ; do
133+
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134+
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135+
136+
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137+
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138+
else
139+
eval `echo args$i`="\"$arg\""
140+
fi
141+
i=$((i+1))
142+
done
143+
case $i in
144+
(0) set -- ;;
145+
(1) set -- "$args0" ;;
146+
(2) set -- "$args0" "$args1" ;;
147+
(3) set -- "$args0" "$args1" "$args2" ;;
148+
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149+
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150+
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151+
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152+
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153+
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154+
esac
155+
fi
156+
157+
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158+
function splitJvmOpts() {
159+
JVM_OPTS=("$@")
160+
}
161+
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162+
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163+
164+
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

0 commit comments

Comments
 (0)