diff --git a/.gitignore b/.gitignore index f953f8a9a..0625ce90f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,11 @@ lint.xml local.properties ant.properties .DS_Store +build.log +build-log.xml +.gradle +build +signing.properties +gradle +gradlew +gradlew.bat diff --git a/AndroidManifest.xml b/AndroidManifest.xml index a5f52bbac..055e9f1a8 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,10 +1,11 @@ - + - + @@ -117,7 +119,7 @@ android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> @@ -145,8 +147,7 @@ android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> - + - + @@ -197,7 +198,7 @@ android:exported="true" android:permission="android.permission.BROADCAST_WAP_PUSH"> - + @@ -206,7 +207,7 @@ android:enabled="true" android:exported="true"> - + @@ -214,7 +215,7 @@ android:enabled="true" android:exported="true"> - + diff --git a/BUILDING.md b/BUILDING.md index 44e0c66ce..a708b5652 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1,23 +1,9 @@ Building TextSecure =================== -Fetch ActionBarSherlock: +1. Ensure the 'Android Support Repository' is installed from the Android SDK manager. +1. Ensure gradle >= 1.8 is installed. - git clone git://github.com/JakeWharton/ActionBarSherlock.git ../ActionBarSherlock - pushd ../ActionBarSherlock && git checkout 4.2.0 && popd +Execute Gradle: -Configure ActionBarSherlock for your android target: - - android update project --path ../ActionBarSherlock/library --target 1 - -Configure TextSecure for your android target, linking to ASB: - - android update project --path . --target 1 --library ../ActionBarSherlock/library - -Finally, both codebases must share the android-support jar. As TextSecure's is newer, use it: - - cp libs/android-support-v4.jar ../ActionBarSherlock/library/libs/android-support-v4.jar - -Assuming your android toolchain is correctly configured, it should now be possible to build the TextSecure apk. - - ant debug + gradle build \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..106c180d1 --- /dev/null +++ b/build.gradle @@ -0,0 +1,86 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:0.5.+' + } +} + +apply plugin: 'android' + +repositories { + mavenCentral() + maven { + url "https://raw.github.com/whispersystems/maven/master/gcm-client/releases/" + } + maven { + url "https://raw.github.com/whispersystems/maven/master/gson/releases/" + } +} + +dependencies { + compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' + compile 'com.googlecode.libphonenumber:libphonenumber:5.3' + compile 'com.android.support:support-v4:18.0.0' + compile 'org.whispersystems:gson:2.1' + compile 'com.google.android.gcm:gcm-client:1.0.2' +} + +android { + compileSdkVersion 17 + buildToolsVersion '17.0.0' + + defaultConfig { + minSdkVersion 8 + targetSdkVersion 17 + } + + android { + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aild.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + } + } + } + + signingConfigs { + release + } + buildTypes { + release { + signingConfig signingConfigs.release + } + } +} + +def Properties props = new Properties() +def propFile = new File('signing.properties') + +if (propFile.canRead()){ + props.load(new FileInputStream(propFile)) + + if (props !=null && + props.containsKey('STORE_FILE') && + props.containsKey('STORE_PASSWORD') && + props.containsKey('KEY_ALIAS') && + props.containsKey('KEY_PASSWORD')) + { + android.signingConfigs.release.storeFile = file(props['STORE_FILE']) + android.signingConfigs.release.storePassword = props['STORE_PASSWORD'] + android.signingConfigs.release.keyAlias = props['KEY_ALIAS'] + android.signingConfigs.release.keyPassword = props['KEY_PASSWORD'] + } else { + println 'signing.properties found but some entries are missing' + android.buildTypes.release.signingConfig = null + } +}else { + println 'signing.properties not found' + android.buildTypes.release.signingConfig = null +} diff --git a/build.xml b/build.xml deleted file mode 100644 index c601eef0d..000000000 --- a/build.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/android-support-v4.jar b/libs/android-support-v4.jar deleted file mode 100644 index 428bdbc02..000000000 Binary files a/libs/android-support-v4.jar and /dev/null differ diff --git a/libs/gcm.jar b/libs/gcm.jar deleted file mode 100644 index ac109a830..000000000 Binary files a/libs/gcm.jar and /dev/null differ diff --git a/libs/libphonenumber-5.3.jar b/libs/libphonenumber-5.3.jar deleted file mode 100644 index 7be725cc6..000000000 Binary files a/libs/libphonenumber-5.3.jar and /dev/null differ diff --git a/libs/thoughtcrimegson-2.1.jar b/libs/thoughtcrimegson-2.1.jar deleted file mode 100644 index 8406d51d0..000000000 Binary files a/libs/thoughtcrimegson-2.1.jar and /dev/null differ diff --git a/res/drawable-hdpi/dialog_full_holo_light.9.png b/res/drawable-hdpi/dialog_full_holo_light.9.png new file mode 100644 index 000000000..2129567f2 Binary files /dev/null and b/res/drawable-hdpi/dialog_full_holo_light.9.png differ diff --git a/res/drawable-mdpi/dialog_full_holo_light.9.png b/res/drawable-mdpi/dialog_full_holo_light.9.png new file mode 100644 index 000000000..0c5770a36 Binary files /dev/null and b/res/drawable-mdpi/dialog_full_holo_light.9.png differ diff --git a/res/drawable-xhdpi/dialog_full_holo_light.9.png b/res/drawable-xhdpi/dialog_full_holo_light.9.png new file mode 100644 index 000000000..d9bd3375f Binary files /dev/null and b/res/drawable-xhdpi/dialog_full_holo_light.9.png differ diff --git a/res/values-v11/themes.xml b/res/values-v11/themes.xml new file mode 100644 index 000000000..d81e4e7b9 --- /dev/null +++ b/res/values-v11/themes.xml @@ -0,0 +1,5 @@ + + + - + + + + + + + + diff --git a/res/values/themes.xml b/res/values/themes.xml index 9cfc9ec6b..be30650a8 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -61,4 +61,29 @@ @drawable/drawer_shadow_dark + + + \ No newline at end of file diff --git a/src/org/thoughtcrime/securesms/AutoInitiateActivity.java b/src/org/thoughtcrime/securesms/AutoInitiateActivity.java index a4aeaff37..99844bbc5 100644 --- a/src/org/thoughtcrime/securesms/AutoInitiateActivity.java +++ b/src/org/thoughtcrime/securesms/AutoInitiateActivity.java @@ -16,6 +16,7 @@ */ package org.thoughtcrime.securesms; +import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; @@ -40,7 +41,7 @@ import org.thoughtcrime.securesms.util.MemoryCleaner; * @author Moxie Marlinspike * */ -public class AutoInitiateActivity extends PassphraseRequiredSherlockActivity { +public class AutoInitiateActivity extends Activity { private long threadId; private Recipient recipient;