diff --git a/.gitignore b/.gitignore index a34c4f9..2c17da7 100644 --- a/.gitignore +++ b/.gitignore @@ -77,4 +77,4 @@ lint/intermediates/ lint/generated/ lint/outputs/ lint/tmp/ -# lint/reports/ +# lint/reports/ \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml index 79ee123..6e6eec1 100644 --- a/.idea/codeStyles/codeStyleConfig.xml +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -1,5 +1,6 @@ \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index a9c9d2d..37a7509 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,45 +1,5 @@ - - - - - - - - - diff --git a/app/build.gradle b/app/build.gradle index c5737f1..9b91d80 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,7 +17,7 @@ android { buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dataBinding { @@ -27,9 +27,9 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation project(path: ':baseui') + implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' diff --git a/app/src/androidTest/java/to/dev/devto/android/ExampleInstrumentedTest.kt b/app/src/androidTest/java/to/dev/devto/android/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..d8dc2aa --- /dev/null +++ b/app/src/androidTest/java/to/dev/devto/android/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package to.dev.devto.android + +import android.support.test.InstrumentationRegistry +import android.support.test.runner.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.getTargetContext() + assertEquals("to.dev.devto.android", appContext.packageName) + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 393f83e..f845bbb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,20 +1,24 @@ - + xmlns:tools="http://schemas.android.com/tools" + package="to.dev.dev_android"> + + - + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/AppTheme" + tools:ignore="GoogleAppIndexingWarning" + > + - + - + diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png new file mode 100644 index 0000000..1568be2 Binary files /dev/null and b/app/src/main/ic_launcher-web.png differ diff --git a/app/src/main/java/to/dev/dev_android/MainActivity.kt b/app/src/main/java/to/dev/dev_android/MainActivity.kt deleted file mode 100644 index b60d645..0000000 --- a/app/src/main/java/to/dev/dev_android/MainActivity.kt +++ /dev/null @@ -1,30 +0,0 @@ -package to.dev.dev_android - -import android.databinding.DataBindingUtil -import android.os.Bundle -import android.support.v7.app.AppCompatActivity -import to.dev.dev_android.databinding.ActivityMainBinding - -class MainActivity : AppCompatActivity() { - private lateinit var binding : ActivityMainBinding - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - binding = DataBindingUtil.setContentView(this, R.layout.activity_main) - - binding.webview.settings.javaScriptEnabled = true - binding.webview.settings.domStorageEnabled = true - - - binding.webview.loadUrl(getString(R.string.main_url)) - } - - override fun onBackPressed() { - if (binding.webview.canGoBack()) { - binding.webview.goBack() - } else { - super.onBackPressed() - } - } - -} diff --git a/app/src/main/java/to/dev/dev_android/view/main/view/MainActivity.kt b/app/src/main/java/to/dev/dev_android/view/main/view/MainActivity.kt new file mode 100644 index 0000000..68d8ab2 --- /dev/null +++ b/app/src/main/java/to/dev/dev_android/view/main/view/MainActivity.kt @@ -0,0 +1,38 @@ +package to.dev.dev_android.view.main.view + +import android.annotation.SuppressLint +import android.os.Bundle +import to.dev.dev_android.R +import to.dev.dev_android.base.activity.BaseActivity +import to.dev.dev_android.databinding.ActivityMainBinding + +class MainActivity : BaseActivity() { + + override fun layout(): Int { + return R.layout.activity_main + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setWebViewSettings() + navigateToHome() + } + + @SuppressLint("SetJavaScriptEnabled") + private fun setWebViewSettings() { + binding.webView.settings.javaScriptEnabled = true + binding.webView.settings.domStorageEnabled = true + } + + private fun navigateToHome() { + binding.webView.loadUrl(resources.getString(R.string.main_url)) + } + + override fun onBackPressed() { + if (binding.webView.canGoBack()) { + binding.webView.goBack() + } else { + super.onBackPressed() + } + } +} diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..01e86ad --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index b59f5e5..1895dfc 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,22 +1,22 @@ - + + + - + + + android:id="@+id/web_view" + android:layout_width="match_parent" + android:layout_height="match_parent" /> - + - \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index bbd3e02..7353dbd 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index bbd3e02..7353dbd 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png index 898f3ed..48d916e 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index dffca36..23dab8e 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png index 64ba76f..73f03d7 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index dae5e08..769a46e 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png index e5ed465..6f660c4 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index 14ed0af..c97ef97 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index b0907ca..735db33 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index d8ae031..1efca7e 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 2c18de9..3433d41 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index beed3cd..01da8ac 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 69b2233..deb7c70 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,6 +1,6 @@ - #008577 - #00574B - #D81B60 + #000000 + #000000 + #87DFD5 diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..beab31f --- /dev/null +++ b/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #000000 + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1405dd0..41633ec 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,4 +1,5 @@ - DEV-Android + DevTo + https://dev.to diff --git a/app/src/test/java/to/dev/devto/android/ExampleUnitTest.kt b/app/src/test/java/to/dev/devto/android/ExampleUnitTest.kt new file mode 100644 index 0000000..ebe5e20 --- /dev/null +++ b/app/src/test/java/to/dev/devto/android/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package to.dev.devto.android + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} diff --git a/baseui/.gitignore b/baseui/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/baseui/.gitignore @@ -0,0 +1 @@ +/build diff --git a/baseui/build.gradle b/baseui/build.gradle new file mode 100644 index 0000000..c1e7b1f --- /dev/null +++ b/baseui/build.gradle @@ -0,0 +1,48 @@ +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-kapt' + +android { + compileSdkVersion 28 + + + + defaultConfig { + minSdkVersion 19 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + dataBinding { + enabled = true + } + +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + + implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + api 'com.android.support:appcompat-v7:28.0.0' + api 'com.android.support.constraint:constraint-layout:1.1.3' + api "android.arch.lifecycle:extensions:1.1.1" + api "android.arch.lifecycle:viewmodel:1.1.1" + + implementation 'com.android.support:appcompat-v7:28.0.0' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + +} diff --git a/baseui/proguard-rules.pro b/baseui/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/baseui/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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 diff --git a/baseui/src/androidTest/java/to/dev/dev_android/base/ExampleInstrumentedTest.java b/baseui/src/androidTest/java/to/dev/dev_android/base/ExampleInstrumentedTest.java new file mode 100644 index 0000000..1708dd1 --- /dev/null +++ b/baseui/src/androidTest/java/to/dev/dev_android/base/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package to.dev.dev_android.base; + +import android.content.Context; +import android.support.test.InstrumentationRegistry; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals("to.dev.dev_android.baseui", appContext.getPackageName()); + } +} diff --git a/baseui/src/main/AndroidManifest.xml b/baseui/src/main/AndroidManifest.xml new file mode 100644 index 0000000..ebe66a2 --- /dev/null +++ b/baseui/src/main/AndroidManifest.xml @@ -0,0 +1,10 @@ + + + + diff --git a/baseui/src/main/java/to/dev/dev_android/base/activity/BaseActivity.kt b/baseui/src/main/java/to/dev/dev_android/base/activity/BaseActivity.kt new file mode 100644 index 0000000..8195129 --- /dev/null +++ b/baseui/src/main/java/to/dev/dev_android/base/activity/BaseActivity.kt @@ -0,0 +1,22 @@ +package to.dev.dev_android.base.activity + +import android.databinding.DataBindingUtil +import android.databinding.ViewDataBinding +import android.os.Bundle +import android.support.annotation.LayoutRes +import android.support.v7.app.AppCompatActivity + +abstract class BaseActivity : AppCompatActivity() { + + lateinit var binding: B + + @LayoutRes + protected abstract fun layout(): Int + + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + binding = DataBindingUtil.setContentView(this, layout()) + } + +} \ No newline at end of file diff --git a/baseui/src/main/java/to/dev/dev_android/base/router/BaseRouter.kt b/baseui/src/main/java/to/dev/dev_android/base/router/BaseRouter.kt new file mode 100644 index 0000000..aaca7ff --- /dev/null +++ b/baseui/src/main/java/to/dev/dev_android/base/router/BaseRouter.kt @@ -0,0 +1,5 @@ +package to.dev.dev_android.base.router + +interface BaseRouter { + +} \ No newline at end of file diff --git a/baseui/src/main/java/to/dev/dev_android/base/router/BaseRouterImpl.kt b/baseui/src/main/java/to/dev/dev_android/base/router/BaseRouterImpl.kt new file mode 100644 index 0000000..879a281 --- /dev/null +++ b/baseui/src/main/java/to/dev/dev_android/base/router/BaseRouterImpl.kt @@ -0,0 +1,5 @@ +package to.dev.dev_android.base.router + +abstract class BaseRouterImpl: BaseRouter { + +} \ No newline at end of file diff --git a/baseui/src/main/java/to/dev/dev_android/base/viewmodel/BaseViewModel.kt b/baseui/src/main/java/to/dev/dev_android/base/viewmodel/BaseViewModel.kt new file mode 100644 index 0000000..110234e --- /dev/null +++ b/baseui/src/main/java/to/dev/dev_android/base/viewmodel/BaseViewModel.kt @@ -0,0 +1,7 @@ +package to.dev.dev_android.base.viewmodel + +import android.arch.lifecycle.ViewModel + +abstract class BaseViewModel : ViewModel() { + +} \ No newline at end of file diff --git a/baseui/src/main/java/to/dev/dev_android/base/viewmodel/ViewModelProviderFactory.kt b/baseui/src/main/java/to/dev/dev_android/base/viewmodel/ViewModelProviderFactory.kt new file mode 100644 index 0000000..b473c97 --- /dev/null +++ b/baseui/src/main/java/to/dev/dev_android/base/viewmodel/ViewModelProviderFactory.kt @@ -0,0 +1,14 @@ +package to.dev.dev_android.base.viewmodel + +import android.arch.lifecycle.ViewModel +import android.arch.lifecycle.ViewModelProvider + +abstract class ViewModelProviderFactory : ViewModelProvider.Factory { + + @Suppress("UNCHECKED_CAST") + override fun create(modelClass: Class): T { + return create() as T + } + + protected abstract fun create(): V +} \ No newline at end of file diff --git a/baseui/src/main/res/drawable-v24/ic_launcher_foreground.xml b/baseui/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..6348baa --- /dev/null +++ b/baseui/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/baseui/src/main/res/drawable/ic_launcher_background.xml b/baseui/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..a0ad202 --- /dev/null +++ b/baseui/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/baseui/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/baseui/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..bbd3e02 --- /dev/null +++ b/baseui/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/baseui/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/baseui/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..bbd3e02 --- /dev/null +++ b/baseui/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/baseui/src/main/res/mipmap-hdpi/ic_launcher.png b/baseui/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..898f3ed Binary files /dev/null and b/baseui/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/baseui/src/main/res/mipmap-hdpi/ic_launcher_round.png b/baseui/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..dffca36 Binary files /dev/null and b/baseui/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/baseui/src/main/res/mipmap-mdpi/ic_launcher.png b/baseui/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..64ba76f Binary files /dev/null and b/baseui/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/baseui/src/main/res/mipmap-mdpi/ic_launcher_round.png b/baseui/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..dae5e08 Binary files /dev/null and b/baseui/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/baseui/src/main/res/mipmap-xhdpi/ic_launcher.png b/baseui/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..e5ed465 Binary files /dev/null and b/baseui/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/baseui/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/baseui/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..14ed0af Binary files /dev/null and b/baseui/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/baseui/src/main/res/mipmap-xxhdpi/ic_launcher.png b/baseui/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..b0907ca Binary files /dev/null and b/baseui/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/baseui/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/baseui/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..d8ae031 Binary files /dev/null and b/baseui/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/baseui/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/baseui/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..2c18de9 Binary files /dev/null and b/baseui/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/baseui/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/baseui/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..beed3cd Binary files /dev/null and b/baseui/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/baseui/src/main/res/values/colors.xml b/baseui/src/main/res/values/colors.xml new file mode 100644 index 0000000..69b2233 --- /dev/null +++ b/baseui/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ + + + #008577 + #00574B + #D81B60 + diff --git a/baseui/src/main/res/values/strings.xml b/baseui/src/main/res/values/strings.xml new file mode 100644 index 0000000..166d2bb --- /dev/null +++ b/baseui/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + baseui + diff --git a/baseui/src/main/res/values/styles.xml b/baseui/src/main/res/values/styles.xml new file mode 100644 index 0000000..5885930 --- /dev/null +++ b/baseui/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/baseui/src/test/java/to/dev/dev_android/base/ExampleUnitTest.java b/baseui/src/test/java/to/dev/dev_android/base/ExampleUnitTest.java new file mode 100644 index 0000000..47560e6 --- /dev/null +++ b/baseui/src/test/java/to/dev/dev_android/base/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package to.dev.dev_android.base; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 23368ff..84eafd8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,15 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.30-eap-11' + ext.kotlin_version = '1.3.21' repositories { google() jcenter() - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' } } dependencies { classpath 'com.android.tools.build:gradle:3.3.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -19,7 +19,6 @@ allprojects { repositories { google() jcenter() - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' } } } diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/data/.gitignore @@ -0,0 +1 @@ +/build diff --git a/data/build.gradle b/data/build.gradle new file mode 100644 index 0000000..f014876 --- /dev/null +++ b/data/build.gradle @@ -0,0 +1,40 @@ +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-android' + +android { + compileSdkVersion 28 + + + + defaultConfig { + minSdkVersion 19 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + + implementation 'com.android.support:appcompat-v7:28.0.0' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} +repositories { + mavenCentral() +} diff --git a/data/proguard-rules.pro b/data/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/data/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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 diff --git a/data/src/androidTest/java/com/example/data/ExampleInstrumentedTest.java b/data/src/androidTest/java/com/example/data/ExampleInstrumentedTest.java new file mode 100644 index 0000000..268af6f --- /dev/null +++ b/data/src/androidTest/java/com/example/data/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.data; + +import android.content.Context; +import android.support.test.InstrumentationRegistry; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals("com.example.basedata.test", appContext.getPackageName()); + } +} diff --git a/data/src/main/AndroidManifest.xml b/data/src/main/AndroidManifest.xml new file mode 100644 index 0000000..d07c989 --- /dev/null +++ b/data/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + diff --git a/data/src/main/java/com/example/data/DataRepository.kt b/data/src/main/java/com/example/data/DataRepository.kt new file mode 100644 index 0000000..2df411b --- /dev/null +++ b/data/src/main/java/com/example/data/DataRepository.kt @@ -0,0 +1,5 @@ +package com.example.data + +class DataRepository { + +} \ No newline at end of file diff --git a/data/src/main/res/values/strings.xml b/data/src/main/res/values/strings.xml new file mode 100644 index 0000000..e154afa --- /dev/null +++ b/data/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + basedata + diff --git a/data/src/test/java/com/example/data/ExampleUnitTest.java b/data/src/test/java/com/example/data/ExampleUnitTest.java new file mode 100644 index 0000000..9863cdc --- /dev/null +++ b/data/src/test/java/com/example/data/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.data; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7c74804..0281d7e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -#Tue Mar 12 15:17:48 EDT 2019 +#Thu Mar 28 21:34:33 CDT 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index e7b4def..4dade0d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -include ':app' +include ':app', ':baseui', ':data'