diff --git a/build.gradle.kts b/build.gradle.kts
index f72709c93..c6917d6d2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -6,6 +6,7 @@ buildscript {
dependencies {
classpath("com.android.tools.build:gradle:3.5.0")
classpath("com.dicedmelon.gradle:jacoco-android:0.1.4")
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
diff --git a/core/build.gradle b/core/build.gradle
new file mode 100644
index 000000000..cda81b662
--- /dev/null
+++ b/core/build.gradle
@@ -0,0 +1,35 @@
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+android {
+ compileSdkVersion 29
+ buildToolsVersion "29.0.2"
+
+ defaultConfig {
+ minSdkVersion 15
+ targetSdkVersion 29
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles 'consumer-rules.pro'
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
+ implementation 'androidx.appcompat:appcompat:1.0.2'
+ implementation 'androidx.core:core-ktx:1.0.2'
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.1'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+}
diff --git a/core/consumer-rules.pro b/core/consumer-rules.pro
new file mode 100644
index 000000000..e69de29bb
diff --git a/core/proguard-rules.pro b/core/proguard-rules.pro
new file mode 100644
index 000000000..f1b424510
--- /dev/null
+++ b/core/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/core/src/androidTest/java/org/kiwix/kiwixmobile/core/ExampleInstrumentedTest.kt b/core/src/androidTest/java/org/kiwix/kiwixmobile/core/ExampleInstrumentedTest.kt
new file mode 100644
index 000000000..e635c2dc8
--- /dev/null
+++ b/core/src/androidTest/java/org/kiwix/kiwixmobile/core/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package org.kiwix.kiwixmobile.core
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext
+ assertEquals("org.kiwix.kiwixmobile.core.test", appContext.packageName)
+ }
+}
diff --git a/core/src/main/AndroidManifest.xml b/core/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..a269bad59
--- /dev/null
+++ b/core/src/main/AndroidManifest.xml
@@ -0,0 +1,2 @@
+
diff --git a/core/src/main/res/values/colors.xml b/core/src/main/res/values/colors.xml
new file mode 100644
index 000000000..3ea04e700
--- /dev/null
+++ b/core/src/main/res/values/colors.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml
new file mode 100644
index 000000000..3ea04e700
--- /dev/null
+++ b/core/src/main/res/values/styles.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/core/src/test/java/org/kiwix/kiwixmobile/core/ExampleUnitTest.kt b/core/src/test/java/org/kiwix/kiwixmobile/core/ExampleUnitTest.kt
new file mode 100644
index 000000000..ef7657f3e
--- /dev/null
+++ b/core/src/test/java/org/kiwix/kiwixmobile/core/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package org.kiwix.kiwixmobile.core
+
+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/settings.gradle b/settings.gradle
new file mode 100644
index 000000000..4f519356c
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,2 @@
+include ':core'
+include ':app'