-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from MathiasSeguy-Android2EE/fromAmber
From amber
- Loading branch information
Showing
58 changed files
with
3,894 additions
and
2,001 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,51 @@ | ||
/bin | ||
# Built application files | ||
*.apk | ||
*.ap_ | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
# Remove temporary DS_Store files | ||
*.DS_Store | ||
|
||
# Generated files | ||
bin/ | ||
gen/ | ||
out/ | ||
|
||
# Gradle files | ||
.gradle/ | ||
build/ | ||
gradle_nexus_release_var_def.gradle | ||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation/ | ||
|
||
# Android Studio captures folder | ||
captures/ | ||
|
||
# Intellij | ||
*.iml | ||
.idea/* | ||
*.idea/ | ||
|
||
# Keystore files | ||
*.jks | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild | ||
app/libs/ | ||
libs/ | ||
release/ | ||
release/**.* | ||
app/release/**.* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Built application files | ||
*.apk | ||
*.ap_ | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
# Remove temporary DS_Store files | ||
*.DS_Store | ||
|
||
# Generated files | ||
bin/ | ||
gen/ | ||
out/ | ||
|
||
# Gradle files | ||
.gradle/ | ||
build/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation/ | ||
|
||
# Android Studio captures folder | ||
captures/ | ||
|
||
# Intellij | ||
*.iml | ||
.idea/* | ||
*.idea/ | ||
|
||
# Keystore files | ||
*.jks | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild | ||
app/libs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apply plugin:'com.android.library' //'com.android.application' //'com.android.library' | ||
/** | ||
* Used to deploy on Nexus our apk | ||
*/ | ||
apply plugin:'maven' | ||
/** | ||
* Our variables definition for the build script | ||
*/ | ||
apply from: 'var_definition.gradle' | ||
/** | ||
* Our gradle file defining the upload | ||
*/ | ||
apply from: 'gradle_nexus_release.gradle' | ||
|
||
android { | ||
println 'the value of compile sdk ' + project.compileSdk | ||
|
||
defaultConfig { | ||
compileSdkVersion project.compileSdk | ||
buildToolsVersion project.buildToolsVersion | ||
minSdkVersion project.minSdk | ||
targetSdkVersion project.targetSdk | ||
versionCode project.versionCode | ||
versionName project.versionName | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' | ||
} | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
dependencies { | ||
|
||
androidTestImplementation "junit:junit:${junitVersion}" | ||
testImplementation "junit:junit:${junitVersion}" | ||
implementation "com.android.support:appcompat-v7:${supportLibVersion}" | ||
|
||
//Google map | ||
//Play services | ||
implementation "com.google.android.gms:play-services-maps:${googlePlayServicesVersion}" | ||
// Retrofit and co | ||
implementation "com.squareup.moshi:moshi:${moshiVersion}" | ||
implementation "com.squareup.retrofit2:retrofit:${retrofit2Version}" | ||
implementation "com.squareup.retrofit2:converter-moshi:${retrofit2Version}" | ||
implementation "com.squareup.okhttp3:okhttp:${okhttp3Version}" | ||
implementation "com.squareup.okhttp3:logging-interceptor:${okhttp3Version}" | ||
implementation "com.squareup.okio:okio:${okioVersion}" | ||
|
||
} | ||
/*********************************************************** | ||
* Defining the weekly release | ||
**********************************************************/ | ||
apply from: 'build_release.gradle' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
//This gradle files aims to generate the release and push the project on Nexus. | ||
/* | ||
* The entry task is generateArchiveAndRelease gAAR*/ | ||
|
||
/*********************************************************** | ||
* Call gradlew generateWeeklyReport for this file | ||
* It's your entry point | ||
**********************************************************/ | ||
|
||
|
||
println 'in release task (at least file)' | ||
//http://coders-kitchen.com/2013/11/01/gradle-git-how-to-map-your-branch-to-a-deployment-profile/ | ||
/*********************************************************** | ||
* Define your attribute here | ||
**********************************************************/ | ||
apply from: 'var_definition.gradle' | ||
/*********************************************************** | ||
* Define your task | ||
**********************************************************/ | ||
//This is the root task | ||
task generateArchiveAndRelease(dependsOn: ['uploadArchives','generateArchive']) { | ||
println 'Task Generate the release: build aar and push on nexus processing...' | ||
//I do nothing, In am an entry point | ||
//I use task dependency to launch the build | ||
doLast{ | ||
println 'doLast of Task generateWeeklyReport processing...' | ||
uploadArchives | ||
} | ||
} | ||
|
||
task generateArchive(dependsOn: ['clean','cleanReleaseReportDirectory', 'listReleaseFiles']) { | ||
println 'Task Generate the release: build aar and push on nexus processing...' | ||
//I do nothing, In am an entry point | ||
//I use task dependency to launch the build | ||
doLast{ | ||
println 'doLast of Task generateWeeklyReport processing...' | ||
uploadArchives | ||
} | ||
} | ||
uploadArchives.mustRunAfter generateArchive | ||
//printing content of the release directory | ||
//http://stackoverflow.com/questions/18569983/androidgradle-list-directories-into-a-file | ||
//The task name is normally listReleaseFiles | ||
//But for this file, the following name is better | ||
task listReleaseFiles(dependsOn: ['moveTheReportToReleaseFolder', | ||
'moveTheAarToReleaseFolder']) { | ||
doLast { | ||
//then list them | ||
println 'Task listReleaseFiles' | ||
println 'starting the work with the branch' + def_apk_name_wrelease | ||
description 'Print in a file the list of the elements of the weekly release folder' | ||
//define the variables for files location | ||
def releaseDir = file("${projectDir}/release/${def_branche_name}") | ||
println "Listing files contained in:${releaseDir} == " | ||
releaseDir.mkdirs() | ||
releaseDir.setWritable(true) | ||
println 'Release Folder=' + releaseDir.absolutePath | ||
def listFile = new File(releaseDir, 'FolderContent.txt') | ||
listFile.setWritable(true) | ||
println 'listFile Folder=' + listFile.absolutePath | ||
//define the content to write | ||
def contents = "" | ||
//get the files tree | ||
def tree = fileTree(dir: releaseDir, excludes: ['**/*.js', | ||
'**/*.css', | ||
'**/*.html', | ||
'**/*.xml']) | ||
//browse all those files | ||
tree.visit { fileDetails -> | ||
if (!fileDetails.isDirectory()) { | ||
contents += "${fileDetails.relativePath}" + "\n" | ||
} | ||
} | ||
println contents | ||
//write the content | ||
listFile.write contents | ||
|
||
println 'listReleaseFiles over' | ||
} | ||
} | ||
/** | ||
* Move the generated files to the delivery | ||
*/ | ||
task moveTheAarToReleaseFolder(type: Copy, dependsOn: 'fullBuild') { | ||
println 'Task moveTheFileToReleaseFolder' | ||
from 'build/outputs/aar/' | ||
into 'release/' + def_branche_name | ||
include('**/*') | ||
exclude('**/*-release-*') | ||
rename { String fileName -> | ||
fileName.replace("app", "gdirection_util") | ||
// fileName.replace(".aar", def_apk_name_wrelease + ".aar") | ||
} | ||
doLast { | ||
println 'moveTheFileToReleaseFolder over' | ||
} | ||
} | ||
//Move the generated files to the delivery | ||
task moveTheReportToReleaseFolder(type: Copy, | ||
dependsOn: ['fullBuild', 'cleanReleaseReportDirectory']) { | ||
println 'Task moveTheFileToReleaseFolder' | ||
from 'build/reports/' | ||
into 'release/' + def_branche_name + '/reports/' | ||
include('**/*') | ||
exclude('**/*-release-*') | ||
doLast { | ||
println 'moveTheFileToReleaseFolder over' | ||
} | ||
} | ||
//Remove directory where release test reports will be copied into | ||
task cleanReleaseReportDirectory(type: Delete) { | ||
doLast { | ||
delete 'release/' + def_branche_name + '/reports/' | ||
} | ||
} | ||
//Make a full build :clean/build/InstrumenetationTests | ||
task fullBuild(dependsOn: [ | ||
':app:assemble',//ok | ||
]) { | ||
doFirst{ | ||
println 'Starting the build' | ||
} | ||
} | ||
|
||
|
||
// Continue gradle tasks even if test fails | ||
tasks.withType(VerificationTask) { task -> | ||
task.ignoreFailures = true | ||
} |
Oops, something went wrong.