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

Commit 610f5ec

Browse files
committed
rename modules to 'core' instead of 'android'
1 parent 0f88af0 commit 610f5ec

File tree

55 files changed

+88
-175
lines changed

Some content is hidden

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

55 files changed

+88
-175
lines changed

gradlew.bat

-84
This file was deleted.

sampleapp/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ android {
3737

3838
dependencies {
3939
implementation fileTree(dir: "libs", include: ["*.jar"])
40-
implementation project(':topl-android-settings')
40+
implementation project(':topl-core-base')
4141
implementation project(':topl-service')
4242
implementation project(':topl-service-settings')
4343
implementation deps.kotlin.stdlib

sampleapp/src/main/java/io/matthewnelson/sampleapp/MyTorSettings.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.matthewnelson.sampleapp
22

3-
import io.matthewnelson.topl_android_settings.TorSettings
3+
import io.matthewnelson.topl_core_base.TorSettings
44

55
/**
66
* See [TorSettings] for comments on what is what.

settings.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
include ':topl-service-prefs'
2-
rootProject.name = 'topl-kotlin-android'
1+
rootProject.name = 'TorOnionProxyLibrary-Android'
32
include ':sampleapp'
4-
include ':topl-android'
5-
include ':topl-android-settings'
3+
include ':topl-core'
4+
include ':topl-core-base'
65
include ':topl-service'
6+
include ':topl-service-prefs'
77
include ':topl-service-settings'
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.matthewnelson.topl_android_settings
1+
package io.matthewnelson.topl_core_base
22

33
import android.content.Context
44
import androidx.test.core.app.ApplicationProvider
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="io.matthewnelson.topl_android_settings">
3-
</manifest>
2+
package="io.matthewnelson.topl_core_base" />
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.matthewnelson.topl_android_settings
1+
package io.matthewnelson.topl_core_base
22

33
import androidx.annotation.StringDef
44

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
1010
1111
See the Apache 2 License for the specific language governing permissions and limitations under the License.
1212
*/
13-
package io.matthewnelson.topl_android_settings
13+
package io.matthewnelson.topl_core_base
1414

1515
import android.content.Context
1616
import java.io.File
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.matthewnelson.topl_android_settings
1+
package io.matthewnelson.topl_core_base
22

33
/**
44
* This class is for defining default values for your torrc file.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.matthewnelson.topl_android_settings
1+
package io.matthewnelson.topl_core_base
22

33
import androidx.annotation.StringDef
44

File renamed without changes.

topl-android/build.gradle renamed to topl-core/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ android {
3636

3737
dependencies {
3838
implementation fileTree(dir: "libs", include: ["*.jar"])
39-
implementation project(':topl-android-settings')
39+
implementation project(':topl-core-base')
4040
implementation project(':topl-service-prefs')
4141
implementation project(':topl-service-settings')
4242
implementation deps.androidx.core

topl-android/proguard-rules.pro renamed to topl-core/proguard-rules.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
# For more details, see
66
# http://developer.android.com/guide/developing/tools/proguard.html
77
-keepattributes *Annotation*
8-
-keep public class io.matthewnelson.topl_android.settings.TorSettingsBuilder { *; }
8+
-keep public class io.matthewnelson.topl_core.settings.TorSettingsBuilder { *; }
99

topl-android/src/androidTest/java/io/matthewnelson/topl_android/TorOnionProxySmokeTest.java renamed to topl-core/src/androidTest/java/io/matthewnelson/topl_core/TorOnionProxySmokeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
6565
6666
*/
6767

68-
package io.matthewnelson.topl_android;
68+
package io.matthewnelson.topl_core;
6969

7070
//import com.msopentech.thali.android.toronionproxy.AndroidOnionProxyManager;
7171
//

topl-android/src/androidTest/java/io/matthewnelson/topl_android/util/TestTorInstaller.java renamed to topl-core/src/androidTest/java/io/matthewnelson/topl_core/util/TestTorInstaller.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.matthewnelson.topl_android.util;
1+
package io.matthewnelson.topl_core.util;
22

33
import android.content.Context;
44

topl-android/src/main/AndroidManifest.xml renamed to topl-core/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="io.matthewnelson.topl_android">
2+
package="io.matthewnelson.topl_core">
33

44
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
55
<uses-permission android:name="android.permission.INTERNET" />

topl-android/src/main/java/io/matthewnelson/topl_android/OnionProxyContext.kt renamed to topl-core/src/main/java/io/matthewnelson/topl_core/OnionProxyContext.kt

+7-8
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
1010
1111
See the Apache 2 License for the specific language governing permissions and limitations under the License.
1212
*/
13-
package io.matthewnelson.topl_android
13+
package io.matthewnelson.topl_core
1414

1515
import android.os.Process
16-
import io.matthewnelson.topl_android_settings.TorSettings
17-
import io.matthewnelson.topl_android.settings.TorSettingsBuilder
18-
import io.matthewnelson.topl_android.util.OnionProxyConsts.ConfigFile
19-
import io.matthewnelson.topl_android.util.FileUtilities
20-
import io.matthewnelson.topl_android.util.TorInstaller
21-
import io.matthewnelson.topl_android.util.WriteObserver
22-
import io.matthewnelson.topl_android_settings.TorConfigFiles
16+
import io.matthewnelson.topl_core_base.TorSettings
17+
import io.matthewnelson.topl_core.util.OnionProxyConsts.ConfigFile
18+
import io.matthewnelson.topl_core.util.FileUtilities
19+
import io.matthewnelson.topl_core.util.TorInstaller
20+
import io.matthewnelson.topl_core.util.WriteObserver
21+
import io.matthewnelson.topl_core_base.TorConfigFiles
2322
import org.slf4j.Logger
2423
import org.slf4j.LoggerFactory
2524
import java.io.*

topl-android/src/main/java/io/matthewnelson/topl_android/OnionProxyManager.kt renamed to topl-core/src/main/java/io/matthewnelson/topl_core/OnionProxyManager.kt

+13-13
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
2525
2626
See the Apache 2 License for the specific language governing permissions and limitations under the License.
2727
*/
28-
package io.matthewnelson.topl_android
28+
package io.matthewnelson.topl_core
2929

3030
import android.content.BroadcastReceiver
3131
import android.content.Context
3232
import android.content.Intent
3333
import android.content.IntentFilter
3434
import android.net.ConnectivityManager
35-
import io.matthewnelson.topl_android.broadcaster.DefaultEventBroadcaster
36-
import io.matthewnelson.topl_android.broadcaster.EventBroadcaster
37-
import io.matthewnelson.topl_android.listener.BaseEventListener
38-
import io.matthewnelson.topl_android.listener.DefaultEventListener
39-
import io.matthewnelson.topl_android.settings.TorSettingsBuilder
40-
import io.matthewnelson.topl_android.util.OnionProxyConsts.ConfigFile
41-
import io.matthewnelson.topl_android.util.FileUtilities
42-
import io.matthewnelson.topl_android.util.WriteObserver
43-
import io.matthewnelson.topl_android_settings.TorStates
35+
import io.matthewnelson.topl_core.broadcaster.DefaultEventBroadcaster
36+
import io.matthewnelson.topl_core.broadcaster.EventBroadcaster
37+
import io.matthewnelson.topl_core.listener.BaseEventListener
38+
import io.matthewnelson.topl_core.listener.DefaultEventListener
39+
import io.matthewnelson.topl_core.settings.TorSettingsBuilder
40+
import io.matthewnelson.topl_core.util.OnionProxyConsts.ConfigFile
41+
import io.matthewnelson.topl_core.util.FileUtilities
42+
import io.matthewnelson.topl_core.util.WriteObserver
43+
import io.matthewnelson.topl_core_base.TorStates
4444
import net.freehaven.tor.control.TorControlCommands
4545
import net.freehaven.tor.control.TorControlConnection
4646
import org.slf4j.Logger
@@ -153,11 +153,11 @@ class OnionProxyManager(
153153
* @param [localPort] The local port that the hidden service will relay connections to
154154
* @return The hidden service's onion address in the form X.onion.
155155
* @throws [IOException] File errors
156-
* @throws [RuntimeException] See [io.matthewnelson.topl_android.util.WriteObserver.poll]
156+
* @throws [RuntimeException] See [io.matthewnelson.topl_core.util.WriteObserver.poll]
157157
* @throws [IllegalStateException] If [controlConnection] is null (service isn't running)
158158
* @throws [NullPointerException] If [controlConnection] is null even after checking
159159
* @throws [SecurityException] Unauthorized access to file/directory.
160-
* @throws [IllegalArgumentException] See [io.matthewnelson.topl_android.util.WriteObserver.checkExists]
160+
* @throws [IllegalArgumentException] See [io.matthewnelson.topl_core.util.WriteObserver.checkExists]
161161
*/
162162
@Synchronized
163163
@Throws(
@@ -550,7 +550,7 @@ class OnionProxyManager(
550550
* @throws [IOException] File problems or timeout
551551
* @throws [SecurityException] Unauthorized access to file/directory.
552552
* @throws [IllegalArgumentException] Method only accepts CONTROL_PORT_FILE or COOKIE_AUTH_FILE
553-
* @throws [RuntimeException] See [io.matthewnelson.topl_android.util.WriteObserver.poll]
553+
* @throws [RuntimeException] See [io.matthewnelson.topl_core.util.WriteObserver.poll]
554554
*/
555555
@Throws(IOException::class,
556556
SecurityException::class,
+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
1010
1111
See the Apache 2 License for the specific language governing permissions and limitations under the License.
1212
*/
13-
package io.matthewnelson.topl_android.broadcaster
13+
package io.matthewnelson.topl_core.broadcaster
1414

15-
import io.matthewnelson.topl_android_settings.TorSettings
15+
import io.matthewnelson.topl_core_base.TorSettings
1616
import org.slf4j.Logger
1717
import org.slf4j.LoggerFactory
1818
import java.io.PrintWriter

topl-android/src/main/java/io/matthewnelson/topl_android/broadcaster/EventBroadcaster.kt renamed to topl-core/src/main/java/io/matthewnelson/topl_core/broadcaster/EventBroadcaster.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
1010
1111
See the Apache 2 License for the specific language governing permissions and limitations under the License.
1212
*/
13-
package io.matthewnelson.topl_android.broadcaster
13+
package io.matthewnelson.topl_core.broadcaster
1414

15-
import io.matthewnelson.topl_android_settings.TorStates
15+
import io.matthewnelson.topl_core_base.TorStates
1616

1717
/**
1818
* Service for sending event logs to the system

topl-android/src/main/java/io/matthewnelson/topl_android/broadcaster/TorStateMachine.kt renamed to topl-core/src/main/java/io/matthewnelson/topl_core/broadcaster/TorStateMachine.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
1010
1111
See the Apache 2 License for the specific language governing permissions and limitations under the License.
1212
*/
13-
package io.matthewnelson.topl_android.broadcaster
13+
package io.matthewnelson.topl_core.broadcaster
1414

15-
import io.matthewnelson.topl_android_settings.TorStates
15+
import io.matthewnelson.topl_core_base.TorStates
1616

1717
/**
1818
* Current Status of Tor

topl-android/src/main/java/io/matthewnelson/topl_android/listener/BaseEventListener.kt renamed to topl-core/src/main/java/io/matthewnelson/topl_core/listener/BaseEventListener.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.matthewnelson.topl_android.listener
1+
package io.matthewnelson.topl_core.listener
22

33
import net.freehaven.tor.control.EventListener
44
import net.freehaven.tor.control.TorControlCommands
@@ -10,7 +10,7 @@ abstract class BaseEventListener: EventListener() {
1010

1111
/**
1212
* See [TorControlCommands.EVENT_NAMES] values. These are *REQUIRED*
13-
* for registering them in [io.matthewnelson.topl_android.OnionProxyManager.start]
13+
* for registering them in [io.matthewnelson.topl_core.OnionProxyManager.start]
1414
* which allows you full control over what you wish to listen for.
1515
* */
1616
abstract val CONTROL_COMMAND_EVENTS: Array<String>

topl-android/src/main/java/io/matthewnelson/topl_android/listener/DefaultEventListener.kt renamed to topl-core/src/main/java/io/matthewnelson/topl_core/listener/DefaultEventListener.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.matthewnelson.topl_android.listener
1+
package io.matthewnelson.topl_core.listener
22

33
import net.freehaven.tor.control.TorControlCommands
44
import org.slf4j.Logger

topl-android/src/main/java/io/matthewnelson/topl_android/settings/SettingsConfig.kt renamed to topl-core/src/main/java/io/matthewnelson/topl_core/settings/SettingsConfig.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
1010
1111
See the Apache 2 License for the specific language governing permissions and limitations under the License.
1212
*/
13-
package io.matthewnelson.topl_android.settings
13+
package io.matthewnelson.topl_core.settings
1414

1515
/**
1616
* Annotates [TorSettingsBuilder] methods. When [TorSettingsBuilder.updateTorSettings] is invoked,

0 commit comments

Comments
 (0)