Skip to content

Commit 3519ad8

Browse files
committed
Split project into modules: UI, Network, Util, and Barcode
1 parent 3bd215d commit 3519ad8

File tree

87 files changed

+756
-409
lines changed

Some content is hidden

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

87 files changed

+756
-409
lines changed

.idea/modules.xml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gemfile

Lines changed: 0 additions & 8 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 200 deletions
This file was deleted.
File renamed without changes.

barcode/build.gradle

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
apply plugin: 'com.android.library'
2+
apply plugin: 'kotlin-android-extensions'
3+
apply plugin: 'kotlin-android'
4+
5+
// Build config types set by the variants
6+
final String CONFIG_TYPE_BOOLEAN = 'boolean'
7+
//noinspection GroovyUnusedAssignment
8+
final String CONFIG_TYPE_INT = 'int'
9+
//noinspection GroovyUnusedAssignment
10+
final String CONFIG_TYPE_LONG = 'long'
11+
//noinspection GroovyUnusedAssignment
12+
final String CONFIG_TYPE_STRING = 'String'
13+
14+
// Build config fields set by the variants
15+
//noinspection GroovyUnusedAssignment
16+
final String CONFIG_LOGGING_ENABLED = 'LOGGING_ENABLED'
17+
18+
group "$rootProject.ext.coreGroupId"
19+
20+
uploadArchives {
21+
repositories {
22+
mavenLocal()
23+
}
24+
}
25+
26+
android {
27+
compileSdkVersion sdkCompileVersion
28+
buildToolsVersion buildTools
29+
defaultConfig {
30+
minSdkVersion sdkMinVersion
31+
targetSdkVersion sdkTargetVersion
32+
versionCode 1
33+
versionName "$rootProject.ext.coreVersion"
34+
35+
consumerProguardFiles 'proguard-rules.pro'
36+
37+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
38+
39+
}
40+
buildTypes {
41+
debug {
42+
debuggable true
43+
buildConfigField CONFIG_TYPE_BOOLEAN, CONFIG_LOGGING_ENABLED, true.toString()
44+
}
45+
release {
46+
buildConfigField CONFIG_TYPE_BOOLEAN, CONFIG_LOGGING_ENABLED, false.toString()
47+
}
48+
}
49+
50+
dataBinding {
51+
enabled = true
52+
}
53+
54+
55+
compileOptions {
56+
sourceCompatibility JavaVersion.VERSION_1_8
57+
targetCompatibility JavaVersion.VERSION_1_8
58+
}
59+
60+
lintOptions {
61+
warningsAsErrors true
62+
abortOnError false
63+
}
64+
65+
}
66+
67+
dependencies {
68+
implementation fileTree(include: ['*.jar'], dir: 'libs')
69+
androidTestImplementation("com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion", {
70+
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
71+
})
72+
73+
// Timber logging util
74+
implementation "com.jakewharton.timber:timber:$rootProject.ext.timberVersion"
75+
76+
// Barcode Support
77+
implementation "com.google.zxing:core:$rootProject.ext.zxingCoreVersion"
78+
implementation "com.journeyapps:zxing-android-embedded:$rootProject.ext.zxingAndroidEmbeddedVersion"
79+
80+
testImplementation "junit:junit:$rootProject.ext.junitVersion"
81+
androidTestImplementation "androidx.test.ext:junit:$rootProject.ext.androidTestVersion"
82+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.ext.kotlinVersion"
83+
}
84+
File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.botnerd.core.barcode;
2+
3+
import android.content.Context;
4+
import androidx.test.platform.app.InstrumentationRegistry;
5+
import androidx.test.runner.AndroidJUnit4;
6+
import org.junit.Test;
7+
import org.junit.runner.RunWith;
8+
9+
import static org.junit.Assert.assertEquals;
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
15+
*/
16+
@RunWith(AndroidJUnit4.class)
17+
public class ExampleInstrumentedTest {
18+
@Test
19+
public void useAppContext() {
20+
// Context of the app under test.
21+
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
22+
23+
assertEquals("com.botnerd.core.barcode.test", appContext.getPackageName());
24+
}
25+
}

barcode/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<manifest package="com.botnerd.core.barcode" />

0 commit comments

Comments
 (0)