Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting Material Library #124

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions blessedDeps.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rootProject.ext {
MOCKITO_VERSION = '2.23.0'
ROBOLECTRIC_VERSION = '3.8'
TESTING_COMPILE_VERSION = '0.15'
MATERIAL_VERSION = '1.1.0-rc01'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use a stable version instead?


deps = [
// Keep these alphabetized
Expand All @@ -32,6 +33,7 @@ rootProject.ext {
kotlinReflect : "org.jetbrains.kotlin:kotlin-reflect:$KOTLIN_VERSION",
kotlinPoet : "com.squareup:kotlinpoet:$KOTLINPOET_VERSION",
kotlinTest : "io.kotlintest:kotlintest:$KOTLIN_TEST_VERSION",
material : "com.google.android.material:material:$MATERIAL_VERSION",
mockitoCore : "org.mockito:mockito-core:$MOCKITO_VERSION",
mockitoAndroid : "org.mockito:mockito-android:$MOCKITO_VERSION",
robolectric : "org.robolectric:robolectric:$ROBOLECTRIC_VERSION",
Expand Down
1 change: 1 addition & 0 deletions paris-material/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
53 changes: 53 additions & 0 deletions paris-material/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.jakewharton.butterknife'

android {
compileSdkVersion rootProject.COMPILE_SDK_VERSION


defaultConfig {
minSdkVersion rootProject.MIN_SDK_VERSION
targetSdkVersion rootProject.TARGET_SDK_VERSION
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
unitTests {
includeAndroidResources = true
}
}

lintOptions {
warningsAsErrors true
}

}

dependencies {
implementation deps.appcompat

api project(':paris-annotations')
implementation project(':paris')
implementation deps.material

// We use "api" here instead of "implementation" to avoid app module warnings like:
// "Warning: unknown enum constant AnnotationTarget.FIELD"
api deps.kotlin

kapt project(':paris-processor')

testImplementation deps.junit
testImplementation deps.kotlinTest
testImplementation deps.mockitoCore
testImplementation deps.robolectric

kaptTest project(':paris-processor')

androidTestImplementation deps.mockitoAndroid
androidTestImplementation deps.espresso
}

//apply from: rootProject.file('gradle/gradle-maven-push.gradle')
Empty file.
21 changes: 21 additions & 0 deletions paris-material/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,24 @@
package com.airbnb.paris.material

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("com.airbnb.paris.material.test", appContext.packageName)
}
}
2 changes: 2 additions & 0 deletions paris-material/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.airbnb.paris.material" />
Loading