Commit 6f48b8a2 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

Merge branch 'release/0.0.1'

parents 18cdd5a1 075566ee
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
</profile-state> </profile-state>
</entry> </entry>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="JDK" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
...@@ -2,33 +2,99 @@ apply plugin: 'com.android.application' ...@@ -2,33 +2,99 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply from: '../dependencies.gradle'
//apply plugin: 'io.fabric'
android { android {
compileSdkVersion 28 compileSdkVersion compileSdkVersion_RoomPark
defaultConfig { defaultConfig {
applicationId "com.biganto.visual.roompark" applicationId $APPLICATION_ID
minSdkVersion 21 ndk {
targetSdkVersion 28 abiFilters 'armeabi-v7a', 'x86'
versionCode 1 }
versionName "1.0" minSdkVersion minSdkVersion_RoomPark
targetSdkVersion targetSdkVersion_RoomPark
versionCode VERSION_CODE
versionName VERSION_NAME
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
debug {
aaptOptions.cruncherEnabled = false
ext.alwaysUpdateBuildId = false
}
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
} }
} }
androidExtensions {
experimental = true
}
configurations.all {
resolutionStrategy.force "com.bluelinelabs:conductor:$conductorVersion"
}
aaptOptions {
noCompress '.unity3d', '.ress', '.resource', '.obb'
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
kapt {
mapDiagnosticLocations = true
} }
dependencies { dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2' implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation 'androidx.core:core-ktx:1.0.2' implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//Koin
implementation "org.koin:koin-core:$koinVersion"
implementation "org.koin:koin-core-ext:$koinVersion"
implementation "org.koin:koin-android:$koinVersion"
implementation "org.koin:koin-android-scope:$koinVersion"
//Material
implementation "com.google.android.material:material:$materialVersion"
//Constraint Layout
implementation "androidx.constraintlayout:constraintlayout:$constrainLayoutVersion"
//image loading store and cashe by url: Picasso
implementation "com.squareup.picasso:picasso:$picassoVersion"
//Logger: Timber
implementation "com.jakewharton.timber:timber:$timberVersion"
//Crashlytics
implementation('com.crashlytics.sdk.android:crashlytics:2.10.0@aar') {
transitive = true;
}
//Tests
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.ext:truth:1.2.0'
androidTestImplementation 'com.google.truth:truth:0.42'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
} }
package com.biganto.visual.roompark package com.biganto.visual.roompark
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.Assert.*
/** /**
* Instrumented test, which will execute on an Android device. * Instrumented test, which will execute on an Android device.
* *
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
package="com.biganto.visual.roompark"> package="com.biganto.visual.roompark">
<application <application
android:name=".base.RoomParkApplication"
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name=".RoomParkMainAcitvity"> <activity android:name=".base.RoomParkMainActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
package com.biganto.visual.roompark.base
import android.app.Application
import android.util.Log
import com.biganto.visual.roompark.BuildConfig
import com.biganto.visual.roompark.di.koin.initDI
import com.crashlytics.android.Crashlytics
import com.squareup.picasso.Picasso
import timber.log.Timber
/**
* Created by Vladislav Bogdashkin on 03.09.2019.
*/
class RoomParkApplication : Application() {
override fun onCreate() {
super.onCreate()
initDI()
if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
else Timber.plant(CrashlyticsTree())
val picassoBuilder = Picasso.Builder(this)
picassoBuilder.listener { _, uri, exception ->
Timber.e(exception)
Timber.e(exception, "PICASSO url = %s", uri.toString())
}
// Picasso.Builder creates the Picasso object to do the actual requests
val picasso = picassoBuilder.build()
try {
Picasso.setSingletonInstance(picasso)
} catch (ignored: IllegalStateException) {
Timber.e(ignored, "PICASSO")
// Picasso instance was already set
// cannot set it after Picasso.with(Context) was already in use
}
}
}
private class CrashlyticsTree : Timber.Tree() {
override fun log(priority: Int, tag: String?, message: String, throwable: Throwable?) {
if (priority == Log.VERBOSE || priority == Log.DEBUG) return
Crashlytics.log(priority, tag, message)
throwable?.let { Crashlytics.logException(it) }
}
}
\ No newline at end of file
package com.biganto.visual.roompark package com.biganto.visual.roompark.base
import android.os.Bundle import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import com.biganto.visual.roompark.R
import com.biganto.visual.roompark.di.koin.StartUpData
import org.koin.android.scope.currentScope
class RoomParkMainAcitvity : AppCompatActivity() { class RoomParkMainActivity : AppCompatActivity() {
lateinit var entryText:TextView
private val entryDate : StartUpData by currentScope.inject()
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main) setContentView(R.layout.activity_main)
entryText = findViewById(R.id.entryTextView)
entryText.text = entryDate.helloText
} }
} }
package com.biganto.visual.roompark.di.koin
import com.biganto.visual.roompark.base.RoomParkApplication
import com.biganto.visual.roompark.base.RoomParkMainActivity
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.core.context.startKoin
import org.koin.core.qualifier.named
import org.koin.dsl.module
/**
* Created by Vladislav Bogdashkin on 03.09.2019.
*/
fun RoomParkApplication.initDI(){
startKoin {
androidLogger()
androidContext(this@initDI)
modules(listOf(appModule, scopesModule))
}
}
val appModule = module{
}
val scopesModule = module {
scope(named<RoomParkMainActivity>()){
scoped { StartUpData("ja pesik!") }
}
}
data class StartUpData(val helloText:String)
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
tools:context=".MainActivity"> tools:context=".MainActivity">
<TextView <TextView
android:id="@+id/entryTextView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Hello World!" android:text="Hello World!"
......
...@@ -3,12 +3,15 @@ ...@@ -3,12 +3,15 @@
buildscript { buildscript {
ext.kotlin_version = '1.3.41' ext.kotlin_version = '1.3.41'
repositories { repositories {
flatDir {
dirs 'libs'
}
google() google()
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.0' classpath "com.android.tools.build:gradle:3.5.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
......
ext {
$APPLICATION_ID = "com.biganto.visual.roompark"
targetSdkVersion_RoomPark = 28
minSdkVersion_RoomPark = 21
compileSdkVersion_RoomPark = 28
VERSION_CODE = 1
VERSION_NAME = "0.0.1"
// supportLibraryVersion = '1.1.0-alpha05'
constrainLayoutVersion = '1.1.3'
// requeryVersion = '1.5.1'
// rxBindingVersion = '2.1.1'
conductorVersion = '3.0.0-rc1'
materialVersion = '1.1.0-alpha09'
gradleVersion = '3.5.0'
koinVersion = '2.0.1'
timberVersion = '4.7.1'
picassoVersion = '2.71828'
}
\ No newline at end of file
Room Park official Android application
- - v.0.0.1 - -
cheers by Vladislav Bogdashkin
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment