Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #66 from mhacks/feature/instant-app
Browse files Browse the repository at this point in the history
Split up app into base and feature modules.
  • Loading branch information
jeffchang5 authored Sep 9, 2018
2 parents 2f1fd1e + 87bbc5d commit d58af4b
Show file tree
Hide file tree
Showing 210 changed files with 617 additions and 69 deletions.
1 change: 1 addition & 0 deletions apk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
41 changes: 41 additions & 0 deletions apk/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apply plugin: 'com.android.application'

apply plugin: "kotlin-android"

android {
compileSdkVersion 27


defaultConfig {
applicationId 'org.mhacks.app'
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

implementation project(':base')
implementation project(':ui')
// implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:support-v4:$google_play_version"
//
// implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
// 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'
}
21 changes: 21 additions & 0 deletions apk/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package la.unum.appapk;

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 <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("la.unum.appapk", appContext.getPackageName());
}
}
37 changes: 37 additions & 0 deletions apk/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<manifest package="org.mhacks.app"
xmlns:android="http://schemas.android.com/apk/res/android">

<application android:label="@string/app_name">

<activity android:name="com.mhacks.app.ui.main.view.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:scheme="http"
android:host="mhacks.org"
android:pathPattern="/schedule" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:scheme="https"
android:host="mhacks.org"
android:pathPattern="/schedule" />
</intent-filter>
</activity>

</application>

</manifest>
18 changes: 0 additions & 18 deletions app/src/main/res/xml/preferences.xml

This file was deleted.

File renamed without changes.
9 changes: 6 additions & 3 deletions app/build.gradle → base/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: "com.android.application"
//apply plugin: "com.android.application"
apply plugin: 'com.android.feature'
apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"
apply plugin: "kotlin-kapt"
Expand All @@ -12,6 +13,7 @@ ext {
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
baseFeature true
dexOptions {
javaMaxHeapSize "4g"
}
Expand All @@ -38,8 +40,7 @@ android {
}
}
defaultConfig {
applicationId 'org.mhacks.app'
minSdkVersion 17
minSdkVersion 21
targetSdkVersion 27
versionName "10.0.0"
resValue "string", "google_maps_api_key", google_maps_api_key
Expand Down Expand Up @@ -121,6 +122,8 @@ dependencies {
}
kapt "android.arch.persistence.room:compiler:$room_version"
kapt "com.github.hotchemi:permissionsdispatcher-processor:3.0.1"

feature project(':ui')
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,43 @@

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter
android:autoVerify="true"
tools:targetApi="m">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="mhacks.org"
android:scheme="http"
android:pathPattern="/schedule" />

</intent-filter>
<intent-filter
android:autoVerify="true"
tools:targetApi="m">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:scheme="https"
android:host="mhacks.org"
android:pathPattern="/schedule" />
</intent-filter>
</activity>
<activity
android:name=".ui.login.LoginActivity"
android:configChanges="orientation"
android:screenOrientation="portrait" />

<activity
android:name=".ui.qrscan.QRScanActivity"
android:launchMode="singleTop"
android:configChanges="orientation"
android:launchMode="singleTop"
android:screenOrientation="portrait" />

<activity
android:name=".ui.qrscan.view.BarcodeCaptureActivity"
android:label="@string/title_activity_barcode_capture"
Expand Down Expand Up @@ -94,6 +119,7 @@
<meta-data
android:name="android.app.default_searchable"
android:value=".SearchResultsActivity" />

</application>

</manifest>
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ object Constants {

const val RELEASE_URL = "https://mhacks.org/v1/"

const val INSTANT_APP_PATH = "/schedule"

}
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,6 @@
<string name="barcode_hint">Tap to capture. Pinch/Stretch to zoom</string>
<string name="not_valid_email">Not a valid e-mail address.</string>
<string name="checked_in">Checked in!</string>
<string name="title_activity_main2">Main2Activity</string>

</resources>
9 changes: 9 additions & 0 deletions base/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="MHacksEditText" parent="@android:style/Widget.EditText">
<item name="android:textColor">@color/white</item>
<item name="android:layout_height">45dip</item>
</style>

</resources>
File renamed without changes.
1 change: 1 addition & 0 deletions instant/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
12 changes: 12 additions & 0 deletions instant/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apply plugin: 'com.android.instantapp'

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"

}

dependencies {
implementation project(':base')
implementation project(':ui')
}
2 changes: 1 addition & 1 deletion mhacks-android.iml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app'
include ':base', ':apk', ':instant', ':ui'
1 change: 1 addition & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
96 changes: 96 additions & 0 deletions ui/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
apply plugin: 'com.android.feature'

apply plugin: "kotlin-kapt"
apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"

android {
compileSdkVersion 27

defaultConfig {
minSdkVersion 21
targetSdkVersion 27
versionCode 3
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

implementation project(':base')

testImplementation 'junit:junit:4.12'

implementation "com.google.dagger:dagger:$dagger_version"
implementation "com.google.dagger:dagger-android-support:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
// androidTestImplementation 'com.android.support.test:runner:1.0.2'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation 'com.google.android.gms:play-services-gcm:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-vision:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'

// Support libraries
implementation "com.android.support:appcompat-v7:$google_play_version"
implementation "com.android.support:support-v4:$google_play_version"
implementation "com.android.support:cardview-v7:$google_play_version"
implementation "com.android.support:recyclerview-v7:$google_play_version"
implementation "com.android.support:design:$google_play_version"

// View
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.github.kenglxn.QRGen:android:2.2.0'
implementation 'com.github.vipulasri:timelineview:1.0.5'
implementation 'me.dm7.barcodescanner:zxing:1.9.8'

// Networking
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.3.0'
implementation 'com.squareup.okhttp3:okhttp:3.9.1'

// Persistence
implementation "android.arch.persistence.room:runtime:$room_version"
implementation "android.arch.persistence.room:rxjava2:$room_version"

// RxJava
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.8'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'

// Debugging
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
implementation 'com.jakewharton.timber:timber:4.6.0'

// Dagger related libraries
implementation "com.google.dagger:dagger:$dagger_version"
implementation "com.google.dagger:dagger-android-support:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"

// Other
implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5'

implementation("com.github.hotchemi:permissionsdispatcher:3.0.1") {
exclude module: "support-v13"
}
kapt "android.arch.persistence.room:compiler:$room_version"
kapt "com.github.hotchemi:permissionsdispatcher-processor:3.0.1"
}
Loading

0 comments on commit d58af4b

Please sign in to comment.