mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Reorganize Android project file structure for Android Studio (#16)
Reorganize Android project file structure for Android Studio.
This commit is contained in:
parent
b5040d8134
commit
8e89039390
499 changed files with 459 additions and 204 deletions
27
.gitignore
vendored
27
.gitignore
vendored
|
@ -55,38 +55,11 @@ docker/prometheus/prometheus.yml
|
|||
docker/redis/redis_replica.conf
|
||||
docker/postgres/postgres.conf
|
||||
|
||||
# ----------------------
|
||||
# Android
|
||||
# ----------------------
|
||||
# built application files
|
||||
*.apk
|
||||
*.ap_
|
||||
|
||||
# files for the dex VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# generated files
|
||||
clients/android/NewsBlur/bin/
|
||||
clients/android/NewsBlur/gen/
|
||||
clients/android/NewsBlur/app/
|
||||
clients/android/NewsBlurTest/bin/
|
||||
clients/android/NewsBlurTest/gen/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
clients/android/NewsBlur/local.properties
|
||||
clients/android/NewsBlurTest/local.properties
|
||||
/originals
|
||||
media/safari/NewsBlur.safariextz
|
||||
|
||||
# IDE files
|
||||
clients/android/NewsBlur/.idea
|
||||
clients/android/NewsBlur/.gradle
|
||||
clients/android/NewsBlur/build.gradle
|
||||
clients/android/NewsBlur/gradlew*
|
||||
clients/android/NewsBlur/settings.gradle
|
||||
/docker/volumes/*
|
||||
|
||||
**/node_modules
|
||||
|
|
26
clients/android/NewsBlur/.gitignore
vendored
26
clients/android/NewsBlur/.gitignore
vendored
|
@ -1,18 +1,10 @@
|
|||
build.xml
|
||||
custom_rules.xml
|
||||
local.properties
|
||||
.*.swo
|
||||
.*.swp
|
||||
*.iml
|
||||
out/
|
||||
bin/
|
||||
.metadata/
|
||||
gen/
|
||||
libs/ActionBarSherlock/
|
||||
.settings/
|
||||
.classpath
|
||||
.project
|
||||
.gradle/
|
||||
app/
|
||||
*.gradle
|
||||
!build.gradle
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
|
|
1
clients/android/NewsBlur/app/.gitignore
vendored
Normal file
1
clients/android/NewsBlur/app/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/build
|
68
clients/android/NewsBlur/app/build.gradle
Normal file
68
clients/android/NewsBlur/app/build.gradle
Normal file
|
@ -0,0 +1,68 @@
|
|||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
id 'org.jetbrains.kotlin.kapt'
|
||||
id 'com.google.dagger.hilt.android'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.newsblur'
|
||||
compileSdk 31
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.newsblur"
|
||||
minSdk 23
|
||||
targetSdk 31
|
||||
versionCode 205
|
||||
versionName "12.0.1"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
}
|
||||
release {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
resources.excludes.add("META-INF/*")
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
buildFeatures.viewBinding = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.fragment:fragment-ktx:1.5.2'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.2'
|
||||
implementation 'com.google.code.gson:gson:2.8.9'
|
||||
implementation 'com.android.billingclient:billing:4.0.0'
|
||||
implementation 'nl.dionsegijn:konfetti:1.2.2'
|
||||
implementation 'com.google.android.play:core:1.10.3'
|
||||
implementation "com.google.android.material:material:1.6.1"
|
||||
implementation "androidx.preference:preference-ktx:1.2.0"
|
||||
implementation "androidx.browser:browser:1.4.0"
|
||||
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
|
||||
implementation 'androidx.lifecycle:lifecycle-process:2.5.1'
|
||||
implementation 'androidx.core:core-splashscreen:1.0.0'
|
||||
implementation "com.google.dagger:hilt-android:2.44"
|
||||
kapt "com.google.dagger:hilt-compiler:2.44"
|
||||
|
||||
testImplementation "junit:junit:4.13.2"
|
||||
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
}
|
43
clients/android/NewsBlur/app/proguard-rules.pro
vendored
Normal file
43
clients/android/NewsBlur/app/proguard-rules.pro
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
# 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
|
||||
-dontobfuscate
|
||||
-printusage
|
||||
|
||||
-keepattributes Exceptions,InnerClasses,Signature
|
||||
-keepattributes *Annotation*
|
||||
|
||||
-dontwarn okio.**
|
||||
-dontnote okio.**
|
||||
-keep class okhttp3.** { *; }
|
||||
-keep interface okhttp3.** { *; }
|
||||
-dontwarn okhttp3.**
|
||||
-dontnote okhttp3.**
|
||||
|
||||
# these two seem to confuse ProGuard, so force keep them
|
||||
-keep class com.newsblur.util.StateFilter { *; }
|
||||
-keep class com.newsblur.view.StateToggleButton$StateChangedListener { *; }
|
||||
|
||||
# we use proguard only as an APK shrinker and many of our dependencies throw
|
||||
# all manner of gross warnings. kept silent by default, the following lines
|
||||
# can be commented out to help diagnose shrinkage errors.
|
||||
-dontwarn **
|
||||
-dontnote **
|
|
@ -0,0 +1,24 @@
|
|||
package com.newsblur
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.newsblur", appContext.packageName)
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@
|
|||
android:hardwareAccelerated="true"
|
||||
android:fullBackupContent="@xml/backupscheme"
|
||||
android:name=".NbApplication">
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.InitActivity"
|
||||
android:label="@string/newsblur"
|
||||
|
@ -37,27 +37,27 @@
|
|||
android:noHistory="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
</activity>
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.LoginProgress"
|
||||
android:noHistory="true"
|
||||
android:label="@string/newsblur" />
|
||||
|
||||
<activity
|
||||
|
||||
<activity
|
||||
android:name=".activity.RegisterProgress"
|
||||
android:noHistory="true"
|
||||
android:label="@string/get_started" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.Main"
|
||||
android:label="@string/newsblur"
|
||||
android:launchMode="singleTask"
|
||||
android:alwaysRetainTaskState="true" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.Profile"
|
||||
android:label="@string/profile"/>
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.Settings"
|
||||
android:label="@string/settings"/>
|
||||
|
@ -68,10 +68,10 @@
|
|||
android:name=".activity.WidgetConfig"
|
||||
android:launchMode="singleTask"
|
||||
android:label="@string/menu_widget" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.FeedItemsList" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.AllStoriesItemsList"
|
||||
android:launchMode="singleTask"/>
|
||||
|
@ -84,22 +84,22 @@
|
|||
|
||||
<activity
|
||||
android:name=".activity.SavedStoriesItemsList" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.AllSharedStoriesItemsList" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.GlobalSharedStoriesItemsList" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.FolderItemsList" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.SocialFeedItemsList" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.FeedReading"/>
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.AllStoriesReading"/>
|
||||
|
||||
|
@ -111,13 +111,13 @@
|
|||
|
||||
<activity
|
||||
android:name=".activity.SavedStoriesReading"/>
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.AllSharedStoriesReading"/>
|
||||
|
||||
<activity
|
||||
android:name=".activity.GlobalSharedStoriesReading"/>
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.FolderReading"/>
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue