Skip to content

Commit

Permalink
Merge branch 'release/0.1-alpha' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
ayayk committed Oct 21, 2017
2 parents fc4e364 + a4b8282 commit 72c7d08
Show file tree
Hide file tree
Showing 189 changed files with 13,097 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-26-alpha
environment:
JVM_OPTS: -Xmx4G -Dkotlin.incremental=false
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Set License
command: |
mkdir -p $ANDROID_HOME/licenses
echo -e "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
echo -e "84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Decrypt signature
command: |
openssl aes-256-cbc -d -k $SIGNATURE_DECRYPT_KEY -in signature.tar.gz.enc -out signature.tar.gz
tar -zxvf signature.tar.gz
mv google-services.json app/
- run:
name: Run Tests
command: ./gradlew lint test -PdisablePreDex
- run:
name: Build APK
command: ./gradlew assembleProductionRelease -PdisablePreDex
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results
- deploy:
name: Deploy to DeployGate
command: |
[ "$CIRCLE_BRANCH" != "master" ] && exit
./gradlew assembleNightlyRelease -PdisablePreDex
./deploy.sh
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
indent_style = space
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
# editorconfig-tools is unable to ignore longs strings or urls
max_line_length = null

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/assets/* linguist-documentation
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Overview
-

## Links
-
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/
!/.idea/codeStyleSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild

# certificates
app.release.jks
app/google-services.json
secret.properties
signature.tar.gz
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Biblio [![CircleCI](https://img.shields.io/circleci/project/github/ayatk/biblio.svg?logoWidth=16&logo=data%3Aimage%2Fsvg%2Bxml%3Bcharset%3Dutf-8%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgdmlld0JveD0iMCAwIDIwMCAyMDAiPjxwYXRoIGZpbGw9IiNEREQiIGQ9Ik03NC43IDEwMGMwLTEzLjIgMTAuNy0yMy44IDIzLjgtMjMuOCAxMy4xIDAgMjMuOCAxMC43IDIzLjggMjMuOCAwIDEzLjEtMTAuNyAyMy44LTIzLjggMjMuOC0xMy4xIDAtMjMuOC0xMC43LTIzLjgtMjMuOHpNOTguNSAwQzUxLjggMCAxMi43IDMyIDEuNiA3NS4yYy0uMS4zLS4xLjYtLjEgMSAwIDIuNiAyLjEgNC44IDQuOCA0LjhoNDAuM2MxLjkgMCAzLjYtMS4xIDQuMy0yLjggOC4zLTE4IDI2LjUtMzAuNiA0Ny42LTMwLjYgMjguOSAwIDUyLjQgMjMuNSA1Mi40IDUyLjRzLTIzLjUgNTIuNC01Mi40IDUyLjRjLTIxLjEgMC0zOS4zLTEyLjUtNDcuNi0zMC42LS44LTEuNi0yLjQtMi44LTQuMy0yLjhINi4zYy0yLjYgMC00LjggMi4xLTQuOCA0LjggMCAuMy4xLjYuMSAxQzEyLjYgMTY4IDUxLjggMjAwIDk4LjUgMjAwYzU1LjIgMCAxMDAtNDQuOCAxMDAtMTAwUzE1My43IDAgOTguNSAweiIvPjwvc3ZnPg%3D%3D)](https://circleci.com/gh/ayatk/biblio/tree/master)

なろうヘビーユーザー向けの小説アプリになる予定の何か

バグだらけです、ゆるして

## できること

* あらかじめ小説をダウンロードしておくと、オフラインの状態でも読むことができます
* その他は頑張って開発中

## Develop

**Android Gradle Plugin 3.0-beta を使っているため Android Studio 3.0-beta でのみビルドが可能です**

## License
Copyright 2016-2017 Aya Tokikaze
Binary file added app.debug.jks
Binary file not shown.
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
259 changes: 259 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
/*
* Copyright (c) 2016-2017 Aya Tokikaze. All Rights Reserved.
*/

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.cookpad.android.licensetools'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'io.fabric'

def APP_NAME = "biblio"
def VERSION = "0.1.0-alpha"
def PACKAGE_NAME = "com.ayatk.biblio"

// for debug info
def GIT_SHA = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
def GIT_BRANCH = (System.getenv("CIRCLE_BRANCH") != null) ? System.getenv("CIRCLE_BRANCH") :
'git rev-parse --abbrev-ref HEAD'.execute([], project.rootDir).text.trim()
def BUILD_NUM = (System.getenv("CIRCLE_BUILD_NUM") != null) ? System.getenv("CIRCLE_BUILD_NUM") :
"1"
def BUILD_TIME = new Date().format("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC"))

// Keys
def RELEASE_STORE_PASSWORD = (System.getenv("RELEASE_STORE_PASSWORD") != null) ?
System.getenv("RELEASE_STORE_PASSWORD") : ""
def RELEASE_KEY_ALIAS = (System.getenv("RELEASE_KEY_ALIAS") != null) ?
System.getenv("RELEASE_KEY_ALIAS") : ""
def RELEASE_KEY_PASSWORD = (System.getenv("RELEASE_KEY_PASSWORD") != null) ?
System.getenv("RELEASE_KEY_PASSWORD") : ""
def FABRIC_API_KEY = (System.getenv("FABRIC_API_KEY") != null) ?
System.getenv("FABRIC_API_KEY") : ""


def secretPropsFile = file("$rootDir/secret.properties")
if (secretPropsFile.canRead()) {
Properties secretProps = new Properties()
secretProps.load(new FileInputStream(secretPropsFile))
RELEASE_STORE_PASSWORD = secretProps['RELEASE_STORE_PASSWORD']
RELEASE_KEY_ALIAS = secretProps['RELEASE_KEY_ALIAS']
RELEASE_KEY_PASSWORD = secretProps['RELEASE_KEY_PASSWORD']
FABRIC_API_KEY = secretProps['FABRIC_API_KEY']
}

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'

defaultConfig {
applicationId PACKAGE_NAME
minSdkVersion 17
targetSdkVersion 26
versionCode BUILD_NUM.toInteger()
versionName VERSION
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary true
multiDexEnabled true

buildConfigField "String", "GIT_SHA", "\"${GIT_SHA}\""
buildConfigField "String", "GIT_BRANCH", "\"${GIT_BRANCH}\""
buildConfigField "String", "BUILD_NUM", "\"${BUILD_NUM}\""
buildConfigField "String", "BUILD_TIME", "\"${BUILD_TIME}\""
manifestPlaceholders = [FABRIC_API_KEY: FABRIC_API_KEY]
}

signingConfigs {
release {
storeFile file("$rootDir/app.release.jks")
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
debug {
storeFile file("$rootDir/app.debug.jks")
storePassword 'android'
keyAlias 'debug'
keyPassword 'android'
}
}

buildTypes {
applicationVariants.all { variant ->
variant.outputs.all { output ->
if (output.outputFile != null && output.outputFile.name.endsWith('.apk')) {
outputFileName = "${APP_NAME}-v${VERSION}.apk"
}
}
}

release {
shrinkResources true
debuggable false
zipAlignEnabled true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}

debug {
minifyEnabled false
debuggable true
zipAlignEnabled true
applicationIdSuffix '.debug'
versionNameSuffix "-debug"
signingConfig signingConfigs.debug
}
}

productFlavors {
develop {
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
// to pre-dex each module and produce an APK that can be tested on
// Android Lollipop without time consuming dex merging processes.
minSdkVersion 24
}
// use deploygate
nightly {
minSdkVersion 17
applicationId "${PACKAGE_NAME}.nightly"
versionName "${VERSION}-nightly"
}
production {
// The actual minSdkVersion for the application.
minSdkVersion 17
}
}

flavorDimensions 'tier'

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
debug.java.srcDirs += 'src/debug/kotlin'
test.java.srcDirs += 'src/test/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
}

packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/MANIFEST.MF'
}

dataBinding {
enabled = true
}

lintOptions {
textReport true
textOutput 'stdout'
// ディープリンクは利用しないので、無効化
disable 'GoogleAppIndexingWarning'
// InvalidPackageのエラーを除外
disable 'InvalidPackage'
disable 'RestrictedApi'
}

testOptions {
unitTests.all {
// All the usual Gradle options.
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen { false }
showCauses true
showExceptions true
showStackTraces true
showStandardStreams true
exceptionFormat "full"
}
}
}
}

ext.supportLibVersion = '26.1.0'

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

// android support libraries
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
implementation "com.android.support:design:${supportLibVersion}"
implementation "com.android.support:recyclerview-v7:${supportLibVersion}"
implementation "com.android.support:cardview-v7:${supportLibVersion}"
implementation "com.android.support:customtabs:${supportLibVersion}"
implementation "com.android.support:preference-v7:${supportLibVersion}"
implementation "com.android.support:preference-v14:${supportLibVersion}"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
kapt "com.android.databinding:compiler:3.0.0-rc2"

// Android Architecture Components
implementation "android.arch.lifecycle:runtime:1.0.3"
implementation "android.arch.lifecycle:extensions:1.0.0-rc1"
implementation "android.arch.lifecycle:reactivestreams:1.0.0-rc1"
kapt "android.arch.lifecycle:compiler:1.0.0-rc1"

// Network
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'

// Dependency Injection
implementation 'com.google.dagger:dagger:2.11'
kapt 'com.google.dagger:dagger-compiler:2.11'

// ReactiveX
implementation 'io.reactivex.rxjava2:rxjava:2.1.4'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxkotlin:2.1.0'

// O/R Mapping
implementation 'com.github.gfx.android.orma:orma:4.2.5'
kapt 'com.github.gfx.android.orma:orma-processor:4.2.5'

// SharedPreferences
implementation 'com.rejasupotaro:kvs-schema:5.0.1'
kapt 'com.rejasupotaro:kvs-schema-compiler:5.0.1'

// Jsoup
implementation 'org.jsoup:jsoup:1.10.3'

// UI
implementation 'com.google.android:flexbox:0.3.1'
implementation 'com.github.mabbas007:TagsEditText:1.0.5'

// Util
implementation 'org.parceler:parceler-api:1.1.9'
kapt 'org.parceler:parceler:1.1.9'
implementation 'org.greenrobot:eventbus:3.0.0'

// Debug
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.1'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
implementation 'com.jakewharton.timber:timber:4.5.1'
debugImplementation 'com.facebook.stetho:stetho:1.5.0'
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
debugImplementation 'com.facebook.stetho:stetho-timber:1.5.0@aar'
debugImplementation 'com.tomoima.debot:debot:2.0.3'
releaseImplementation 'com.tomoima.debot:debot-no-op:2.0.3'
debugImplementation 'jp.wasabeef:takt:1.0.5'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true
}

androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
}

apply plugin: 'com.google.gms.google-services'
Loading

0 comments on commit 72c7d08

Please sign in to comment.