Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit a78a5a0

Browse files
authored
Merge pull request #2 from 05nelsonm/mn/feature/topl-android-service
Builds out an MVP of the foreground service
2 parents c7f3a40 + f3286f5 commit a78a5a0

File tree

104 files changed

+210654
-1396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+210654
-1396
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,3 @@ proguard/
2424

2525
# intellij
2626
.idea/
27-
28-
sampleapp/
29-
topl-android-service/

README.md

+62-215
Large diffs are not rendered by default.

gradle/dependencies.gradle

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,27 @@ ext.versions = [
88
ext.deps = [
99
androidGradlePlugin: "com.android.tools.build:gradle:4.0.0",
1010
androidx: [
11+
appCompat: "androidx.appcompat:appcompat:1.1.0",
12+
constraintLayout: "androidx.constraintlayout:constraintlayout:1.1.3",
13+
core: "androidx.core:core-ktx:1.3.0",
14+
localBroadcastManager: "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0",
1115
test: [
1216
core: "androidx.test:core:1.2.0",
13-
junit: "androidx.test.ext:junit:1.1.1",
1417
espresso: "androidx.test.espresso:espresso-core:3.2.0",
18+
junit: "androidx.test.ext:junit:1.1.1",
1519
],
1620
],
1721
gradleVersions: "com.github.ben-manes:gradle-versions-plugin:0.20.0",
18-
jtorctl: "net.freehaven.tor.control:jtorctl:0.2",
22+
jtorctl: "info.guardianproject:jtorctl:0.4",
1923
junit: "junit:junit:4.12",
2024
kotlin: [
25+
coroutinesCore: "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6",
2126
gradlePlugin: "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
2227
stdlib: "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}",
2328
],
2429
slf4j: [
2530
api: "org.slf4j:slf4j-api:${versions.slf4j}",
2631
android: "org.slf4j:slf4j-android:${versions.slf4j}",
2732
],
33+
robolectric: "org.robolectric:robolectric:4.3.1",
2834
]

gradlew.bat

-84
This file was deleted.
File renamed without changes.

sampleapp/build.gradle

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-android-extensions'
4+
5+
android {
6+
compileSdkVersion versions.compileSdk
7+
buildToolsVersion "29.0.3"
8+
9+
defaultConfig {
10+
applicationId "io.matthewnelson.sampleapp"
11+
minSdkVersion versions.minSdk
12+
targetSdkVersion versions.compileSdk
13+
versionCode 1
14+
versionName VERSION_NAME
15+
16+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17+
testInstrumentationRunnerArguments disableAnalytics: 'true'
18+
consumerProguardFiles 'proguard-rules.pro'
19+
}
20+
21+
buildTypes {
22+
release {
23+
minifyEnabled false
24+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
25+
}
26+
}
27+
28+
compileOptions {
29+
sourceCompatibility JavaVersion.VERSION_1_8
30+
targetCompatibility JavaVersion.VERSION_1_8
31+
}
32+
33+
kotlinOptions {
34+
jvmTarget = JavaVersion.VERSION_1_8
35+
}
36+
}
37+
38+
dependencies {
39+
implementation fileTree(dir: "libs", include: ["*.jar"])
40+
implementation project(':topl-core-base')
41+
implementation project(':topl-service')
42+
implementation deps.kotlin.stdlib
43+
implementation deps.androidx.core
44+
implementation deps.androidx.appCompat
45+
implementation deps.androidx.constraintLayout
46+
47+
testImplementation deps.junit
48+
49+
androidTestImplementation deps.androidx.test.core
50+
androidTestImplementation deps.androidx.test.espresso
51+
androidTestImplementation deps.androidx.test.junit
52+
53+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package io.matthewnelson.sampleapp
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("io.matthewnelson.sampleapp", appContext.packageName)
23+
}
24+
}
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="io.matthewnelson.sampleapp">
4+
5+
<application
6+
android:name=".App"
7+
android:allowBackup="true"
8+
android:icon="@mipmap/ic_launcher"
9+
android:label="@string/app_name"
10+
android:roundIcon="@mipmap/ic_launcher_round"
11+
android:supportsRtl="true"
12+
android:theme="@style/AppTheme">
13+
<activity android:name=".MainActivity">
14+
<intent-filter>
15+
<action android:name="android.intent.action.MAIN" />
16+
17+
<category android:name="android.intent.category.LAUNCHER" />
18+
</intent-filter>
19+
</activity>
20+
</application>
21+
22+
</manifest>

0 commit comments

Comments
 (0)