Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
First commit
  • Loading branch information
DwyaneQ committed May 4, 2018
1 parent 1fae4df commit e4d6c1d
Show file tree
Hide file tree
Showing 353 changed files with 27,063 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .idea/misc.xml

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

10 changes: 10 additions & 0 deletions .idea/modules.xml

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

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

9 changes: 9 additions & 0 deletions ETHToken/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
44 changes: 44 additions & 0 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.4.1)

# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.

add_library( # Sets the name of the library.
native-lib

# Sets the library as a shared library.
SHARED

# Provides a relative path to your source file(s).
src/main/cpp/native-lib.cpp )

# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.

find_library( # Sets the name of the path variable.
log-lib

# Specifies the name of the NDK library that
# you want CMake to locate.
log )

# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.

target_link_libraries( # Specifies the target library.
native-lib

# Links the target library to the log library
# included in the NDK.
${log-lib} )
98 changes: 98 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao' // apply plugin

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.gongchuang.ethtoken"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags ""
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
// cmake {
// path "CMakeLists.txt"
// }
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
// Annotation
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
// leakcanary 可以迅速定位内存泄漏
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
// Rx
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.1.7'
//Retrofit
compile 'com.squareup.retrofit2:retrofit:2.3.0'
// Gson converter
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
// Okhttp
compile 'com.squareup.okhttp3:okhttp:3.8.1'
// RxJava adapter
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
// 沉浸式状态栏
compile 'com.gyf.barlibrary:barlibrary:2.3.0'
compile 'com.lcodecorex:tkrefreshlayout:1.0.7'
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.22'
implementation project(':zxingsupport')

// compile 'com.google.guava:guava:24.1-jre'
// or, for Android:
compile 'com.google.guava:guava:24.1-android'

// 以太坊开发库
compile('org.web3j:core:3.3.1-android')
// 圆形图片
compile 'de.hdodenhof:circleimageview:2.1.0'

// 圆点Indicator
compile 'com.youth.banner:banner:1.4.10'
// glide 图片加载库
implementation("com.github.bumptech.glide:glide:4.6.1") {
exclude group: "com.android.support"
}
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'

// greenDao
compile 'org.greenrobot:greendao:3.2.2'
// EventBus
compile 'org.greenrobot:eventbus:3.0.0'
// FlexboxLayoutManager
implementation 'com.google.android:flexbox:0.3.2'
// ViewPagerIndicator
compile 'com.shizhefei:ViewPagerIndicator:1.1.6'
// bitcoinj
implementation'org.bitcoinj:bitcoinj-core:0.14.3'
}

greendao {
schemaVersion 1
// daoPackage 'com.fengpi.gen'
// targetGenDir 'src/main/java'
}
32 changes: 32 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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

# glide 的混淆代码
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
# banner 的混淆代码
-keep class com.youth.banner.** {
*;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.gongchuang.ethtoken;

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() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.gongchuang.ethtoken", appContext.getPackageName());
}
}
58 changes: 58 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gongchuang.ethtoken">

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />

<application
android:name=".ETHTokenApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:screenOrientation="portrait"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar">
<activity
android:name=".ui.activity.MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.activity.QRCodeScannerActivity" />
<activity android:name=".ui.activity.CreateWalletActivity" />
<activity android:name=".ui.activity.AddNewPropertyActivity" />
<activity android:name=".ui.activity.SearchIcoTokenActivity" />
<activity android:name=".ui.activity.GatheringQRCodeActivity" />
<activity android:name=".ui.activity.ContactsActivity" />
<activity android:name=".ui.activity.ETCTransferActivity" />
<activity android:name=".ui.activity.PropertyDetailActivity" />
<activity android:name=".ui.activity.WalletMangerActivity" />
<activity android:name=".ui.activity.MessageCenterActivity" />
<activity android:name=".ui.activity.SystemSettingActivity" />
<activity android:name=".ui.activity.LanguageSettingActivity" />
<activity android:name=".ui.activity.CurrencyUnitSettingActivity" />
<activity android:name=".ui.activity.Web3SettingActivity" />
<activity android:name=".ui.activity.TradingRecordActivity" />
<activity android:name=".ui.activity.SwitchWalletActivity" />
<activity android:name=".ui.activity.WalletBackupActivity" />
<activity android:name=".ui.activity.MnemonicBackupActivity" />
<activity android:name=".ui.activity.VerifyMnemonicBackupActivity" />
<activity android:name=".ui.activity.LoadWalletActivity" />
<activity android:name=".ui.activity.WalletDetailActivity" />
<activity android:name=".ui.activity.ModifyPasswordActivity" />
<activity android:name=".ui.activity.DeriveKeystoreActivity" />
</application>

</manifest>
Loading

0 comments on commit e4d6c1d

Please sign in to comment.