Skip to content

Commit 8b693c3

Browse files
committed
Initial Commit
0 parents  commit 8b693c3

75 files changed

Lines changed: 3621 additions & 0 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Generated bz Android Studio
2+
.DS_Store
3+
4+
# Built application files
5+
*.apk
6+
*.ap_
7+
8+
# Files for the ART/Dalvik VM
9+
*.dex
10+
11+
# Java class files
12+
*.class
13+
14+
# Generated files
15+
bin/
16+
gen/
17+
out/
18+
19+
# Gradle files
20+
.gradle/
21+
build/
22+
23+
# Local configuration file (sdk path, etc)
24+
local.properties
25+
26+
# Proguard folder generated by Eclipse
27+
proguard/
28+
29+
# Log Files
30+
*.log
31+
32+
# Android Studio Navigation editor temp files
33+
.navigation/
34+
35+
# Android Studio captures folder
36+
captures/
37+
38+
# Intellij
39+
*.iml
40+
.idea/workspace.xml
41+
.idea/libraries
42+
.idea/tasks.xml
43+
.idea/.name
44+
.idea/compiler.xml
45+
.idea/copyright/profiles_settings.xml
46+
.idea/encodings.xml
47+
.idea/misc.xml
48+
.idea/modules.xml
49+
.idea/scopes/scope_settings.xml
50+
.idea/vcs.xml
51+
52+
# Keystore files
53+
*.jks
54+
55+
# External native build folder generated in Android Studio 2.2 and later
56+
.externalNativeBuild
57+
libs/

.idea/compiler.xml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Private Build Information
2+
build.properties
3+
version.properties
4+
5+
# Built application files
6+
*.apk
7+
*.ap_
8+
9+
# Files for the ART/Dalvik VM
10+
*.dex
11+
12+
# Java class files
13+
*.class
14+
15+
# Generated files
16+
bin/
17+
gen/
18+
out/
19+
20+
# Gradle files
21+
.gradle/
22+
build/
23+
24+
# Local configuration file (sdk path, etc)
25+
local.properties
26+
27+
# Proguard folder generated by Eclipse
28+
proguard/
29+
30+
# Log Files
31+
*.log
32+
33+
# Android Studio Navigation editor temp files
34+
.navigation/
35+
36+
# Android Studio captures folder
37+
captures/
38+
39+
# Intellij
40+
*.iml
41+
.idea/workspace.xml
42+
.idea/libraries
43+
.idea/tasks.xml
44+
.idea/.name
45+
.idea/compiler.xml
46+
.idea/copyright/profiles_settings.xml
47+
.idea/encodings.xml
48+
.idea/misc.xml
49+
.idea/modules.xml
50+
.idea/scopes/scope_settings.xml
51+
.idea/vcs.xml
52+
53+
# Keystore files
54+
*.jks
55+
56+
# External native build folder generated in Android Studio 2.2 and later
57+
.externalNativeBuild

app/build.gradle

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
apply plugin: 'com.android.application'
2+
3+
def getDate() {
4+
def date = new Date()
5+
def formattedDate = date.format('yyyyMMddHHmm')
6+
return formattedDate
7+
}
8+
9+
def versionPropsFile = file('version.properties')
10+
def buildPropsFile = file('build.properties')
11+
def vcode = 1
12+
def vname = "1.0.0"
13+
def aid = "com.example.motecontrol"
14+
15+
if (versionPropsFile.canRead()) {
16+
def Properties versionProps = new Properties()
17+
versionProps.load(new FileInputStream(versionPropsFile))
18+
vname = versionProps['VERSION_NAME']
19+
vcode = versionProps['VERSION_CODE'].toInteger() + 1
20+
versionProps['VERSION_CODE'] = vcode.toString()
21+
versionProps.store(versionPropsFile.newWriter(), null)
22+
}
23+
24+
if (buildPropsFile.canRead()) {
25+
def Properties buildProps = new Properties()
26+
buildProps.load(new FileInputStream(buildPropsFile))
27+
aid = buildProps['applicationID']
28+
}
29+
30+
println ""
31+
println "MoteControl Build Properties"
32+
println "----------------------------"
33+
println "versionName set to: " + vname
34+
println "versionCode set to: " + vcode
35+
println "applicationID set to: " + aid
36+
println ""
37+
38+
if(project.hasProperty("General.signingLocation")
39+
&& new File(project.property("General.signingLocation") + ".gradle").exists()) {
40+
apply from: project.property("General.signingLocation") + ".gradle";
41+
}
42+
43+
android {
44+
compileSdkVersion 24
45+
buildToolsVersion "24.0.3"
46+
47+
defaultConfig {
48+
applicationId aid
49+
minSdkVersion 16
50+
targetSdkVersion 24
51+
versionCode vcode
52+
versionName vname
53+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
54+
vectorDrawables.useSupportLibrary = true
55+
}
56+
57+
signingConfigs {
58+
release
59+
}
60+
61+
62+
buildTypes {
63+
debug {
64+
applicationIdSuffix ".dbg"
65+
versionNameSuffix "-" + getDate() + "D"
66+
}
67+
68+
release {
69+
debuggable false
70+
jniDebuggable false
71+
signingConfig signingConfigs.release
72+
versionNameSuffix "-" + getDate() + "R"
73+
minifyEnabled true
74+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
75+
}
76+
77+
}
78+
}
79+
80+
dependencies {
81+
compile fileTree(dir: 'libs', include: ['*.jar'])
82+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
83+
exclude group: 'com.android.support', module: 'support-annotations'
84+
})
85+
compile 'com.android.support:appcompat-v7:24.2.1'
86+
compile 'com.android.support:design:24.2.1'
87+
compile 'com.google.code.gson:gson:2.7'
88+
compile 'com.squareup.retrofit2:retrofit:2.1.0'
89+
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
90+
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
91+
compile 'com.android.support:support-v4:24.2.1'
92+
compile 'com.android.support:support-vector-drawable:24.2.1'
93+
testCompile 'junit:junit:4.12'
94+
}
95+
96+
if (buildPropsFile.canRead()) {
97+
def props = new Properties()
98+
props.load(new FileInputStream(rootProject.file(buildPropsFile)))
99+
100+
println ""
101+
println "MoteControl Signing Properties"
102+
println "----------------------------"
103+
104+
def signingConfigFile = file(props['signingConfiguration'])
105+
println "Signing Configuration: " + signingConfigFile
106+
107+
if (signingConfigFile.canRead()) {
108+
def signingProps = new Properties()
109+
signingProps.load(new FileInputStream(signingConfigFile))
110+
111+
def keystoreFile = file(signingProps['keyStore'])
112+
println "keystore: " + keystoreFile
113+
android.signingConfigs.release.storeFile keystoreFile
114+
android.signingConfigs.release.storePassword signingProps['keyStorePassword']
115+
android.signingConfigs.release.keyAlias signingProps['keyAlias']
116+
android.signingConfigs.release.keyPassword signingProps['keyAliasPassword']
117+
}
118+
println ""
119+
}

0 commit comments

Comments
 (0)