-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 86a4260
Showing
11 changed files
with
773 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
.DS_Store |
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,6 @@ | ||
#Store my configuration files which are used across projects | ||
|
||
##Common | ||
##Android | ||
##iOS | ||
##Windows |
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,55 @@ | ||
# Built application files | ||
*.apk | ||
*.ap_ | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# 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/workspace.xml | ||
.idea/tasks.xml | ||
.idea/gradle.xml | ||
.idea/dictionaries | ||
.idea/libraries | ||
|
||
# Keystore files | ||
*.jks | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild | ||
|
||
# Google Services (e.g. APIs or Firebase) | ||
google-services.json | ||
|
||
# Freeline | ||
freeline.py | ||
freeline/ | ||
freeline_project_description.json |
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,44 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
//Version information | ||
def versionMajor = 1 | ||
def versionMinor = 0 | ||
def versionPatch = 0 | ||
|
||
ext{ | ||
MIN_SDK = 14 | ||
TARGET_SDK = 25 | ||
BUILD_TOOLS = "25.0.2" | ||
GOOGLE_LIBS = "25.1.0" | ||
VERSION_CODE = versionMajor * 10000 + versionMinor * 100 + versionPatch | ||
VERSION_NAME = "${versionMajor}.${versionMinor}.${versionPatch}" | ||
} | ||
|
||
android { | ||
compileSdkVersion TARGET_SDK | ||
buildToolsVersion BUILD_TOOLS | ||
|
||
defaultConfig { | ||
applicationId "com.quangnguyen.sample-app" | ||
minSdkVersion MIN_SDK | ||
targetSdkVersion TARGET_SDK | ||
versionCode VERSION_CODE | ||
versionName VERSION_NAME | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
testCompile 'junit:junit:4.12' | ||
compile "com.android.support:appcompat-v7:$GOOGLE_LIBS" | ||
compile "com.android.support:support-v4:$GOOGLE_LIBS" | ||
|
||
//Other dependences | ||
//..... | ||
} |
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,68 @@ | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
version = libraryVersion | ||
|
||
/* | ||
* Uncomment this one if you want to include source code and distribute to jcenter | ||
* | ||
* In some case, you only want to distribute .aar files | ||
* (For example, your source code is obfuscated by Proguard and dont) | ||
* Without source code .jar files, you only can publish on bintray respository | ||
* To distribute on jcenter, you need source code included | ||
*/ | ||
|
||
//if (project.hasProperty("android")) { // Android libraries | ||
// task sourcesJar(type: Jar) { | ||
// classifier = 'sources' | ||
// from android.sourceSets.main.java.srcDirs | ||
// } | ||
// | ||
// task javadoc(type: Javadoc) { | ||
// source = android.sourceSets.main.java.srcDirs | ||
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
// } | ||
//} else { // Java libraries | ||
// task sourcesJar(type: Jar, dependsOn: classes) { | ||
// classifier = 'sources' | ||
// from sourceSets.main.allSource | ||
// } | ||
//} | ||
// | ||
//task javadocJar(type: Jar, dependsOn: javadoc) { | ||
// classifier = 'javadoc' | ||
// from javadoc.destinationDir | ||
//} | ||
// | ||
//artifacts { | ||
// archives javadocJar | ||
// archives sourcesJar | ||
//} | ||
|
||
// Bintray | ||
Properties properties = new Properties() | ||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
|
||
bintray { | ||
user = properties.getProperty("bintray.user") | ||
key = properties.getProperty("bintray.apikey") | ||
|
||
configurations = ['archives'] | ||
pkg { | ||
repo = bintrayRepo | ||
name = bintrayName | ||
desc = libraryDescription | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = allLicenses | ||
publish = true | ||
publicDownloadNumbers = true | ||
version { | ||
desc = libraryDescription | ||
gpg { | ||
sign = true //Determines whether to GPG sign the files. The default is false | ||
passphrase = properties.getProperty("bintray.gpg.password") | ||
//Optional. The passphrase for GPG signing' | ||
} | ||
} | ||
} | ||
} |
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,41 @@ | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
|
||
group = publishedGroupId // Maven Group ID for the artifact | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
// This generates POM.xml with proper parameters | ||
pom.project { | ||
packaging 'aar' | ||
groupId publishedGroupId | ||
artifactId artifact | ||
|
||
// Add your description here | ||
name libraryName | ||
description libraryDescription | ||
url siteUrl | ||
|
||
// Set your license | ||
licenses { | ||
license { | ||
name licenseName | ||
url licenseUrl | ||
} | ||
} | ||
developers { | ||
developer { | ||
id developerId | ||
name developerName | ||
email developerEmail | ||
} | ||
} | ||
scm { | ||
connection gitUrl | ||
developerConnection gitUrl | ||
url siteUrl | ||
|
||
} | ||
} | ||
|
||
} | ||
} |
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,93 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
// Manifest version information | ||
def versionMajor = 0 | ||
def versionMinor = 0 | ||
def versionPatch = 1 | ||
|
||
/** | ||
* jcenter configuration | ||
*/ | ||
ext { | ||
|
||
//For bintray and jcenter distribution | ||
bintrayRepo = 'maven' | ||
bintrayName = 'sample-library' | ||
|
||
publishedGroupId = 'com.quangnguyen.sample' | ||
libraryName = 'SampleLibrary' | ||
artifact = 'sample-library' //This artifact name should be the same with library module name | ||
|
||
libraryDescription = 'Simple, clean and short description' | ||
|
||
siteUrl = 'https://github.com/quangctkm9207/sample-library' | ||
gitUrl = 'https://github.com/quangctkm9207/sample-library.git' | ||
|
||
libraryVersion = "${versionMajor}.${versionMinor}.${versionPatch}" | ||
|
||
developerId = 'quangctkm9207' | ||
developerName = 'Quang Nguyen' | ||
developerEmail = '[email protected]' | ||
|
||
licenseName = 'The Apache Software License, Version 2.0' //Example for license | ||
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
allLicenses = ["Apache-2.0"] | ||
|
||
//Project variable definition | ||
MIN_SDK = 14 | ||
TARGET_SDK = 25 | ||
BUILD_TOOLS = "25.0.2" | ||
GOOGLE_LIBS = "25.1.0" | ||
VERSION_CODE = versionMajor * 10000 + versionMinor * 100 + versionPatch | ||
VERSION_NAME = "${versionMajor}.${versionMinor}.${versionPatch}" | ||
|
||
} | ||
|
||
buildscript { | ||
repositories { | ||
//.... | ||
} | ||
|
||
dependencies { | ||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' | ||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' | ||
|
||
//Others | ||
//..... | ||
} | ||
} | ||
|
||
/** | ||
* Project configuration | ||
*/ | ||
|
||
android { | ||
compileSdkVersion TARGET_SDK | ||
buildToolsVersion BUILD_TOOLS | ||
|
||
defaultConfig { | ||
minSdkVersion MIN_SDK | ||
targetSdkVersion TARGET_SDK | ||
versionCode VERSION_CODE | ||
versionName VERSION_NAME | ||
|
||
} | ||
buildTypes { | ||
debug{ | ||
} | ||
release { | ||
minifyEnabled true | ||
debuggable false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
//...... | ||
} | ||
|
||
//use gradle distribution configuration file on remote Github repository | ||
apply from: 'https://raw.githubusercontent.com/quangctkm9207/template-files/master/android/gradle/install.gradle' | ||
apply from: 'https://raw.githubusercontent.com/quangctkm9207/template-files/master/android/gradle/bintray.gradle' |
Oops, something went wrong.