Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

Commit a57f034

Browse files
committed
config project as clean architecture
1 parent 552e674 commit a57f034

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+296
-50
lines changed

app/build.gradle

Lines changed: 0 additions & 34 deletions
This file was deleted.

build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
apply from: 'dependencies.gradle'
23

34
buildscript {
45
repositories {
56
jcenter()
7+
mavenCentral()
68
}
79
dependencies {
810
classpath 'com.android.tools.build:gradle:2.2.2'
@@ -14,8 +16,12 @@ buildscript {
1416
}
1517

1618
allprojects {
17-
repositories {
18-
jcenter()
19+
ext {
20+
androidApplicationId = 'com.syject.lesspass'
21+
androidVersionCode = 1
22+
androidVersionName = "1.0"
23+
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
24+
testApplicationId = 'com.syject.lesspass.test'
1925
}
2026
}
2127

File renamed without changes.

data/build.gradle

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
}
5+
dependencies {
6+
classpath 'me.tatarka:gradle-retrolambda:3.4.0'
7+
}
8+
}
9+
10+
apply plugin: 'com.android.library'
11+
apply plugin: 'com.neenbedankt.android-apt'
12+
apply plugin: 'me.tatarka.retrolambda'
13+
14+
android {
15+
16+
def globalConfiguration = rootProject.extensions.getByName("ext")
17+
18+
compileSdkVersion globalConfiguration.getAt("androidCompileSdkVersion")
19+
buildToolsVersion globalConfiguration.getAt("androidBuildToolsVersion")
20+
21+
publishNonDefault true
22+
23+
defaultConfig {
24+
minSdkVersion globalConfiguration.getAt("androidMinSdkVersion")
25+
targetSdkVersion globalConfiguration.getAt("androidTargetSdkVersion")
26+
versionCode globalConfiguration.getAt("androidVersionCode")
27+
}
28+
29+
compileOptions {
30+
sourceCompatibility JavaVersion.VERSION_1_8
31+
targetCompatibility JavaVersion.VERSION_1_8
32+
}
33+
}
34+
35+
dependencies {
36+
def dataDependencies = rootProject.ext.dataDependencies
37+
def testDependencies = rootProject.ext.dataTestDependencies
38+
39+
compile project(':domain')
40+
compile dataDependencies.rxJava
41+
compile dataDependencies.rxAndroid
42+
43+
testCompile testDependencies.junit
44+
}
File renamed without changes.

data/src/main/AndroidManifest.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.syject.data">
3+
4+
<application android:allowBackup="true" />
5+
</manifest>

app/src/test/java/com/syject/lesspass/ExampleUnitTest.java renamed to data/src/test/java/com/syject/data/ExampleUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.syject.lesspass;
1+
package com.syject.data;
22

33
import org.junit.Test;
44

dependencies.gradle

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
allprojects {
2+
repositories {
3+
jcenter()
4+
}
5+
}
6+
7+
ext {
8+
//Android
9+
androidBuildToolsVersion = "24.0.3"
10+
androidMinSdkVersion = 16
11+
androidTargetSdkVersion = 25
12+
androidCompileSdkVersion = 25
13+
14+
//Libraries
15+
rxJavaVersion = '1.2.3'
16+
rxAndroidVersion = '1.2.1'
17+
AAVersion = '4.1.0'
18+
appcompatVersion = 'v7:25.0.0'
19+
20+
//Testing
21+
jUnitVersion = '4.12'
22+
espressoVersion = '2.2.2'
23+
testingSupportLibVersion = '0.1'
24+
25+
//Development
26+
27+
presentationDependencies = [
28+
rxJava : "io.reactivex:rxjava:${rxJavaVersion}",
29+
rxAndroid : "io.reactivex:rxandroid:${rxAndroidVersion}",
30+
AA : "org.androidannotations:androidannotations:${AAVersion}",
31+
AACompiler: "org.androidannotations:androidannotations-api:${AAVersion}",
32+
appcompat : "com.android.support:appcompat-${appcompatVersion}",
33+
]
34+
35+
presentationTestDependencies = [
36+
espresso : "com.android.support.test.espresso:espresso-core:${espressoVersion}",
37+
testingSupportLib: "com.android.support.test:testing-support-lib:${testingSupportLibVersion}",
38+
junit: "junit:junit:${jUnitVersion}",
39+
]
40+
41+
domainDependencies = [
42+
rxJava: "io.reactivex:rxjava:${rxJavaVersion}",
43+
]
44+
45+
domainTestDependencies = [
46+
junit: "junit:junit:${jUnitVersion}",
47+
]
48+
49+
dataDependencies = [
50+
rxJava : "io.reactivex:rxjava:${rxJavaVersion}",
51+
rxAndroid: "io.reactivex:rxandroid:${rxAndroidVersion}",
52+
]
53+
54+
dataTestDependencies = [
55+
junit: "junit:junit:${jUnitVersion}",
56+
]
57+
}

domain/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

domain/build.gradle

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apply plugin: 'java'
2+
3+
//noinspection GroovyUnusedAssignment
4+
sourceCompatibility = 1.7
5+
//noinspection GroovyUnusedAssignment
6+
targetCompatibility = 1.7
7+
8+
configurations {
9+
provided
10+
}
11+
12+
sourceSets {
13+
main {
14+
compileClasspath += configurations.provided
15+
}
16+
}
17+
18+
dependencies {
19+
def domainDependencies = rootProject.ext.domainDependencies
20+
def domainTestDependencies = rootProject.ext.domainTestDependencies
21+
22+
compile domainDependencies.rxJava
23+
testCompile domainTestDependencies.junit
24+
}

0 commit comments

Comments
 (0)