newEnvironment

fun newEnvironment(loader: (File) -> ResourceLoader.Tor): TorRuntime.Environment(source)

Android implementation which creates the TorRuntime.Environment using the provided TorServiceConfig.

NOTE: TorRuntime.Environment.BuilderScope.serviceFactoryLoader is set automatically and tor will run inside an android.app.Service.

Directories (emulators & devices):

  • workDirectory: app_torservice

  • cacheDirectory: cache/torservice

Directories (android unit tests where testUseBuildDirectory = false):

  • workDirectory: {system temp}/kmp_tor_android_test/torservice/work

  • cacheDirectory: {system temp}/kmp_tor_android_test/torservice/cache

Directories (android unit tests where testUseBuildDirectory = true):

  • workDirectory: {module}/build/kmp_tor_android_test/torservice/work

  • cacheDirectory: {module}/build/kmp_tor_android_test/torservice/cache


fun newEnvironment(dirName: String, loader: (File) -> ResourceLoader.Tor): TorRuntime.Environment(source)
fun newEnvironment(dirName: String, loader: (File) -> ResourceLoader.Tor, block: ThisBlock<TorRuntime.Environment.BuilderScope>): TorRuntime.Environment(source)

Android implementation which creates the TorRuntime.Environment using the provided TorServiceConfig.

NOTE: TorRuntime.Environment.BuilderScope.serviceFactoryLoader is set automatically and tor will run inside an android.app.Service.

Directories (emulators & devices):

Directories (android unit tests where testUseBuildDirectory = false):

  • workDirectory: {system temp}/kmp_tor_android_test/dirName/work

  • cacheDirectory: {system temp}/kmp_tor_android_test/dirName/cache

Directories (android unit tests where testUseBuildDirectory = true):

  • workDirectory: {module}/build/kmp_tor_android_test/dirName/work

  • cacheDirectory: {module}/build/kmp_tor_android_test/dirName/cache

Throws

IllegalArgumentException

if dirName is an absolute file path