Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build/
.gradle/
local.properties
*.apk
*.ap_
*.jks
*.keystore
keystore.properties
69 changes: 48 additions & 21 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.tomdroid"
android:versionName="0.8.0dev" android:versionCode="15">
android:versionName="0.8.0-dehumanizer77" android:versionCode="15">

<uses-sdk android:minSdkVersion="16"
android:targetSdkVersion="33" />

<uses-sdk android:minSdkVersion="4"
android:targetSdkVersion="11" />

<supports-screens android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar"
android:requestLegacyExternalStorage="true"
>

<!-- Required for Apache HTTP client on API 28+ -->
<uses-library android:name="org.apache.http.legacy" android:required="false" />

<activity android:label="@string/app_name"
android:theme="@style/LightTheme"
android:name=".ui.Tomdroid"
android:configChanges="orientation|screenSize"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -48,10 +56,11 @@
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable"/>
</activity>

<activity android:name=".ui.ViewNote"
android:theme="@style/LightTheme"
android:label="@string/view_title"
android:exported="false"
>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand All @@ -64,10 +73,12 @@
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/LightTheme"
android:label="@string/edit_title"
android:exported="false"
>
</activity>
<activity android:name=".util.Receive"
android:theme="@style/LightTheme"
android:exported="true"
>
<!-- To receive data from other apps via share -->
<intent-filter>
Expand Down Expand Up @@ -137,39 +148,55 @@
<data android:mimeType="application/note" />
</intent-filter>
</activity>
<provider
<provider
android:name=".util.SearchSuggestionProvider"
android:authorities="org.tomdroid.util.SearchSuggestionProvider"
android:exported="false"
/>

<provider android:name="NoteProvider"
android:authorities="org.tomdroid.notes"
android:exported="false"
/>
<activity android:name=".ui.PreferencesActivity"

<!-- FileProvider for sharing note files safely on API 24+ -->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="org.tomdroid.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_provider_paths" />
</provider>

<activity android:name=".ui.PreferencesActivity"
android:theme="@style/LightTheme"
android:label="@string/pref_title"
android:configChanges="orientation|screenSize"
android:exported="false"
>
</activity>
<activity android:name=".ui.ShortcutActivity"
<activity android:name=".ui.ShortcutActivity"
android:theme="@style/LightTheme"
android:label="@string/shortcut_menu_item_caption">
android:label="@string/shortcut_menu_item_caption"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.CREATE_SHORTCUT"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.CompareNotes"
<activity android:name=".ui.CompareNotes"
android:theme="@style/LightTheme"
android:label="@string/app_name">
android:label="@string/app_name"
android:exported="false">
</activity>

<activity android:name=".ui.FilePickerActivity"
android:theme="@style/LightTheme"
android:label="@string/filePickerTitle"/>
<uses-library android:name="android.test.runner" />
android:label="@string/filePickerTitle"
android:exported="false"/>

</application>
<instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="org.tomdroid"></instrumentation>

</manifest>
</manifest>
67 changes: 48 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,71 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
classpath 'com.android.tools.build:gradle:7.4.2'
}
}
apply plugin: 'android'

apply plugin: 'com.android.application'

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
implementation fileTree(dir: 'libs', include: '*.jar')
implementation 'androidx.core:core:1.9.0'
}

android {
compileSdkVersion 15
buildToolsVersion "18.0.1"
namespace 'org.tomdroid'
compileSdkVersion 33

signingConfigs {
release {
storeFile file('release-key.jks')
storePassword project.findProperty('storePassword') ?: ''
keyAlias 'dehumanizer77'
keyPassword project.findProperty('keyPassword') ?: ''
}
}

defaultConfig {
minSdkVersion 16
targetSdkVersion 33
versionCode 15
versionName "0.8.0-dehumanizer77"
}

useLibrary 'org.apache.http.legacy'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['tests','src']
resources.srcDirs = ['tests','src']
aidl.srcDirs = ['tests','src']
renderscript.srcDirs = ['tests','src']
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}

// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')

// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
androidTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

lint {
abortOnError false
disable 'MissingPermission'
}

buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.release
}
}
}
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx2048m
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
2 changes: 1 addition & 1 deletion res/layout/file_picker_content_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<ListView
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:id="@+id/android:list"
android:id="@android:id/list"
/>
</LinearLayout>
</LinearLayout>
2 changes: 1 addition & 1 deletion res/layout/shortcuts_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
android:layout_height="fill_parent"
android:orientation="vertical"
>
<ListView android:id="@android:id/android:list"
<ListView android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
Expand Down
10 changes: 5 additions & 5 deletions res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@
<item name="android:ellipsize">marquee</item>
</style>

<style name="ActionBarCompatTitle" parent="style/ActionBarCompatTitleBase">
<style name="ActionBarCompatTitle" parent="@style/ActionBarCompatTitleBase">
<item name="android:textColor">#000000</item>
</style>
<style name="ActionBarCompatTitleDark" parent="style/ActionBarCompatTitleBase">
<style name="ActionBarCompatTitleDark" parent="@style/ActionBarCompatTitleBase">
<item name="android:textColor">#FFFFFF</item>
</style>
<style name="ActionBarCompatItem" parent="style/ActionBarCompatItemBase">

<style name="ActionBarCompatItem" parent="@style/ActionBarCompatItemBase">
</style>

<style name="ActionBarCompatHomeItem" parent="style/ActionBarCompatItemBase">
<style name="ActionBarCompatHomeItem" parent="@style/ActionBarCompatItemBase">
</style>
</resources>
4 changes: 4 additions & 0 deletions res/xml/file_provider_paths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<files-path name="notes" path="." />
</paths>
15 changes: 15 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "tomdroid"
Loading