diff --git a/.gitignore b/.gitignore index 0066218..e88333f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,81 @@ -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures -/.idea +# Built application files +*.apk +*.aar +*.ap_ +*.aab +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ +# Uncomment the following line in case you need and you don't have the release build type files in your app +# release/ + +# 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 -flow-kit/flow-kit.gpg + +# Idea Folder +.idea/* +# Include dictionary +!.idea/dictionaries +# Include code-style +!.idea/codeStyles + +# Keystore files +# Uncomment the following lines if you do not want to check your keystore files in. +*.jks +*.keystore + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild +.cxx/ + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +# Version control +vcs.xml + +# lint +lint/intermediates/ +lint/generated/ +lint/outputs/ +lint/tmp/ +# lint/reports/ diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..0d15693 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/.idea/dictionaries/defualt.xml b/.idea/dictionaries/defualt.xml new file mode 100644 index 0000000..9526d56 --- /dev/null +++ b/.idea/dictionaries/defualt.xml @@ -0,0 +1,8 @@ + + + + anidero + zeoflow + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 98aad47..270ffb8 100644 --- a/build.gradle +++ b/build.gradle @@ -39,5 +39,5 @@ ext { minSdkVersion = 21 targetSdkVersion = 30 versionCode = 1 - versionName = "1.5.1" + versionName = "1.5.2" } diff --git a/buildSrc/.gitignore b/buildSrc/.gitignore new file mode 100644 index 0000000..84b30df --- /dev/null +++ b/buildSrc/.gitignore @@ -0,0 +1,5 @@ +# SIGNING KEYS +*.gpg + +# Key Credentials +gradle.properties \ No newline at end of file diff --git a/buildSrc/upload.gradle b/buildSrc/upload.gradle new file mode 100644 index 0000000..f27fe90 --- /dev/null +++ b/buildSrc/upload.gradle @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2021 ZeoFlow S.R.L. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +apply plugin: 'maven' +apply plugin: 'signing' + +def isReleaseBuild() { + return VERSION_NAME.contains("SNAPSHOT") == false +} + +def getReleaseRepositoryUrl() { + return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL + : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" +} + +def getSnapshotRepositoryUrl() { + return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL + : "https://oss.sonatype.org/content/repositories/snapshots/" +} + +def getRepositoryUsername() { + return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" +} + +def getRepositoryPassword() { + return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" +} + +afterEvaluate { project -> + project.generateDebugBuildConfig.enabled = false + project.generateReleaseBuildConfig.enabled = false + uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + pom.groupId = GROUP + pom.artifactId = POM_ARTIFACT_ID + pom.version = VERSION_NAME + + repository(url: getReleaseRepositoryUrl()) { + authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) + } + snapshotRepository(url: getSnapshotRepositoryUrl()) { + authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) + } + + pom.project { + name POM_NAME + packaging POM_PACKAGING + description POM_DESCRIPTION + url POM_URL + + scm { + url POM_SCM_URL + connection POM_SCM_CONNECTION + developerConnection POM_SCM_DEV_CONNECTION + } + + licenses { + license { + name POM_LICENCE_NAME + url POM_LICENCE_URL + distribution POM_LICENCE_DIST + } + } + + developers { + developer { + id POM_DEVELOPER_ID + name POM_DEVELOPER_NAME + } + } + } + } + } + } + + signing { + required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } + sign configurations.archives + } + + task androidSourcesJar(type: Jar) { + classifier = 'sources' + from android.sourceSets.main.java.sourceFiles + } + + artifacts { + archives androidSourcesJar + } +} diff --git a/flow-kit/build.gradle b/flow-kit/build.gradle index 1c19bfa..c28926b 100644 --- a/flow-kit/build.gradle +++ b/flow-kit/build.gradle @@ -50,7 +50,7 @@ dependencies { } -apply from: "${rootProject.projectDir}/flow-kit/maven-push.gradle" +apply from: "${rootProject.projectDir}/buildSrc/upload.gradle" repositories { mavenCentral() } \ No newline at end of file diff --git a/flow-kit/gradle.properties b/flow-kit/gradle.properties index 21dfcb7..a6d7cae 100644 --- a/flow-kit/gradle.properties +++ b/flow-kit/gradle.properties @@ -1,18 +1,3 @@ -POM_NAME=FlowKit -POM_ARTIFACT_ID=flow-kit -POM_PACKAGING=aar -VERSION_NAME=1.5.1 -GROUP=com.zeoflow -POM_DESCRIPTION=An Android Library that comes with useful features and components -POM_URL=https://github.com/zeoflow/flow-kit -POM_SCM_URL=https://github.com/zeoflow/flow-kit -POM_SCM_CONNECTION=scm:git@github.com:zeoflow/flow-kit.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:zeoflow/flow-kit.git -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo -POM_DEVELOPER_ID=zeoflow -POM_DEVELOPER_NAME=ZeoFlow -org.gradle.daemon=true -NEXUS_USERNAME= -NEXUS_PASSWORD= \ No newline at end of file +# artifact id +# com.zeoflow:flow-kit +POM_ARTIFACT_ID=flow-kit \ No newline at end of file diff --git a/flow-kit/maven-push.gradle b/flow-kit/maven-push.gradle deleted file mode 100644 index 7ca179b..0000000 --- a/flow-kit/maven-push.gradle +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2020 ZeoFlow - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'maven' -apply plugin: 'signing' - -def isReleaseBuild() { - return VERSION_NAME.contains("SNAPSHOT") == false -} - -def getReleaseRepositoryUrl() { - return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL - : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" -} - -def getSnapshotRepositoryUrl() { - return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL - : "https://oss.sonatype.org/content/repositories/snapshots/" -} - -def getRepositoryUsername() { - return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" -} - -def getRepositoryPassword() { - return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" -} - -afterEvaluate { project -> - project.generateDebugBuildConfig.enabled = false - project.generateReleaseBuildConfig.enabled = false - uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - - pom.groupId = GROUP - pom.artifactId = POM_ARTIFACT_ID - pom.version = VERSION_NAME - - repository(url: getReleaseRepositoryUrl()) { - authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) - } - snapshotRepository(url: getSnapshotRepositoryUrl()) { - authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) - } - - pom.project { - name POM_NAME - packaging POM_PACKAGING - description POM_DESCRIPTION - url POM_URL - - scm { - url POM_SCM_URL - connection POM_SCM_CONNECTION - developerConnection POM_SCM_DEV_CONNECTION - } - - licenses { - license { - name POM_LICENCE_NAME - url POM_LICENCE_URL - distribution POM_LICENCE_DIST - } - } - - developers { - developer { - id POM_DEVELOPER_ID - name POM_DEVELOPER_NAME - } - } - } - } - } - } - - signing { - required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } - sign configurations.archives - } - - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.sourceFiles - } - - artifacts { - archives androidSourcesJar - } -} diff --git a/gradle.properties b/gradle.properties index 5a568ca..9e3a253 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,3 +18,22 @@ # org.gradle.parallel=true android.useAndroidX=true android.enableJetifier=true + +# Maven +POM_NAME=FlowKit +POM_ARTIFACT_ID=flow-kit +POM_PACKAGING=aar +VERSION_NAME=1.5.2 +GROUP=com.zeoflow +POM_DESCRIPTION=An Android Library that comes with useful features and components +POM_URL=https://github.com/zeoflow/flow-kit +POM_SCM_URL=https://github.com/zeoflow/flow-kit +POM_SCM_CONNECTION=scm:git@github.com:zeoflow/flow-kit.git +POM_SCM_DEV_CONNECTION=scm:git@github.com:zeoflow/flow-kit.git +POM_LICENCE_NAME=The Apache Software License, Version 2.0 +POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt +POM_LICENCE_DIST=repo +POM_DEVELOPER_ID=zeoflow +POM_DEVELOPER_NAME=ZeoFlow +POM_DEVELOPER_EMAIL=open-source@zeoflow.com +org.gradle.daemon=true