summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2015-01-01 16:28:17 +0100
committerVictor Häggqvist <[email protected]>2015-01-01 16:28:17 +0100
commit5d2f7b4c8f76a1fb7cb8d3d0ad9ca7e6fcc6274a (patch)
tree5c5ed9ccd86d39201c64526c4557ab6c48d69a56
init
-rw-r--r--.gitignore101
-rw-r--r--LICENSE202
-rw-r--r--README.md43
-rw-r--r--aboutit-sample/.gitignore1
-rw-r--r--aboutit-sample/build.gradle26
-rw-r--r--aboutit-sample/proguard-rules.pro17
-rw-r--r--aboutit-sample/src/androidTest/java/com/snilius/aboutit/sample/ApplicationTest.java13
-rw-r--r--aboutit-sample/src/main/AndroidManifest.xml25
-rw-r--r--aboutit-sample/src/main/java/com/snilius/aboutit/sample/AboutActivity.java30
-rw-r--r--aboutit-sample/src/main/java/com/snilius/aboutit/sample/MainActivity.java90
-rw-r--r--aboutit-sample/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 9397 bytes
-rw-r--r--aboutit-sample/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 5237 bytes
-rw-r--r--aboutit-sample/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 14383 bytes
-rw-r--r--aboutit-sample/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 19388 bytes
-rw-r--r--aboutit-sample/src/main/res/layout/activity_about.xml17
-rw-r--r--aboutit-sample/src/main/res/layout/activity_main.xml41
-rw-r--r--aboutit-sample/src/main/res/layout/toolbar.xml7
-rw-r--r--aboutit-sample/src/main/res/menu/menu_main.xml10
-rw-r--r--aboutit-sample/src/main/res/values-w820dp/dimens.xml6
-rw-r--r--aboutit-sample/src/main/res/values/dimens.xml5
-rw-r--r--aboutit-sample/src/main/res/values/strings.xml20
-rw-r--r--aboutit-sample/src/main/res/values/styles.xml9
-rw-r--r--aboutit/.gitignore1
-rw-r--r--aboutit/build.gradle24
-rw-r--r--aboutit/proguard-rules.pro17
-rw-r--r--aboutit/src/androidTest/java/com/snilius/aboutit/ApplicationTest.java13
-rw-r--r--aboutit/src/main/AndroidManifest.xml8
-rw-r--r--aboutit/src/main/java/com/snilius/aboutit/AboutIt.java232
-rw-r--r--aboutit/src/main/java/com/snilius/aboutit/L.java24
-rw-r--r--aboutit/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 9397 bytes
-rw-r--r--aboutit/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 5237 bytes
-rw-r--r--aboutit/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 14383 bytes
-rw-r--r--aboutit/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 19388 bytes
-rw-r--r--aboutit/src/main/res/values/strings.xml3
-rw-r--r--build.gradle19
-rw-r--r--gradle.properties18
-rw-r--r--gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xgradlew164
-rw-r--r--gradlew.bat90
-rw-r--r--img/img1.pngbin0 -> 136414 bytes
-rw-r--r--img/img2.pngbin0 -> 76982 bytes
-rw-r--r--img/img3.pngbin0 -> 92011 bytes
-rw-r--r--img/img4.pngbin0 -> 75056 bytes
-rw-r--r--settings.gradle1
44 files changed, 1283 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c6ad895
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,101 @@
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+# Built application files
+*.apk
+*.ap_
+
+# Files for the Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+
+# Gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+target/
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+.gradle
+build/
+
+# Ignore Gradle GUI config
+gradle-app.setting
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
+
+*.iml
+
+## Directory-based project format:
+.idea/
+# if you remove the above rule, at least ignore the following:
+
+# User-specific stuff:
+# .idea/workspace.xml
+# .idea/tasks.xml
+# .idea/dictionaries
+
+# Sensitive or high-churn files:
+# .idea/dataSources.ids
+# .idea/dataSources.xml
+# .idea/sqlDataSources.xml
+# .idea/dynamic.xml
+# .idea/uiDesigner.xml
+
+# Gradle:
+# .idea/gradle.xml
+# .idea/libraries
+
+# Mongo Explorer plugin:
+# .idea/mongoSettings.xml
+
+## File-based project format:
+*.ipr
+*.iws
+
+## Plugin-specific files:
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..54c08de
--- /dev/null
+++ b/README.md
@@ -0,0 +1,43 @@
+AboutIt
+=======
+A About-page creator
+
+#Sample
+A "complete" sample
+```java
+new AboutIt(this).app(R.string.app_name)
+ .buildInfo(BuildConfig.DEBUG, BuildConfig.VERSION_CODE, BuildConfig.VERSION_NAME)
+ .copyright("Example Business")
+ .libLicense("AboutIt", "Victor Häggqvist", L.AP2, "https://github.com/victorhaggqvist/aboutit")
+ .toTextView(R.id.about_text);
+```
+
+Just the dymanic version name and copyright year display
+```java
+new AboutIt(this).app("My App")
+ .buildInfo(BuildConfig.DEBUG, BuildConfig.VERSION_CODE, BuildConfig.VERSION_NAME)
+ .copyright("Example Business")
+ .toTextView(R.id.about_text);
+```
+
+The code for these samples are all in the sample app [here](aboutit-sample/src/main/java/com/snilius/aboutit/sample/MainActivity.java).
+
+|![sample](img/img1.png)|![sample](img/img2.png)|
+|--|--|
+|![sample](img/img3.png)|![sample](img/img4.png)|
+
+#License
+
+ Copyright 2014-2015 Victor Häggqvist
+
+ 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.
diff --git a/aboutit-sample/.gitignore b/aboutit-sample/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/aboutit-sample/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/aboutit-sample/build.gradle b/aboutit-sample/build.gradle
new file mode 100644
index 0000000..803ffdb
--- /dev/null
+++ b/aboutit-sample/build.gradle
@@ -0,0 +1,26 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 21
+ buildToolsVersion "21.1.2"
+
+ defaultConfig {
+ applicationId "com.snilius.aboutit.sample"
+ minSdkVersion 14
+ targetSdkVersion 21
+ versionCode 1
+ versionName "1.0.0"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(include: ['*.jar'], dir: 'libs')
+ compile 'com.android.support:appcompat-v7:21.0.3'
+ compile project(':aboutit')
+}
diff --git a/aboutit-sample/proguard-rules.pro b/aboutit-sample/proguard-rules.pro
new file mode 100644
index 0000000..7873ee5
--- /dev/null
+++ b/aboutit-sample/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /opt/android-sdk-linux/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/aboutit-sample/src/androidTest/java/com/snilius/aboutit/sample/ApplicationTest.java b/aboutit-sample/src/androidTest/java/com/snilius/aboutit/sample/ApplicationTest.java
new file mode 100644
index 0000000..62e8d66
--- /dev/null
+++ b/aboutit-sample/src/androidTest/java/com/snilius/aboutit/sample/ApplicationTest.java
@@ -0,0 +1,13 @@
+package com.snilius.aboutit.sample;
+
+import android.app.Application;
+import android.test.ApplicationTestCase;
+
+/**
+ * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
+ */
+public class ApplicationTest extends ApplicationTestCase<Application> {
+ public ApplicationTest() {
+ super(Application.class);
+ }
+} \ No newline at end of file
diff --git a/aboutit-sample/src/main/AndroidManifest.xml b/aboutit-sample/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..ec86830
--- /dev/null
+++ b/aboutit-sample/src/main/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.snilius.aboutit.sample" >
+
+ <application
+ android:allowBackup="true"
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name"
+ android:theme="@style/AppTheme" >
+ <activity
+ android:name=".MainActivity"
+ android:label="@string/app_name" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ <activity
+ android:name=".AboutActivity"
+ android:label="@string/title_activity_about" >
+ </activity>
+ </application>
+
+</manifest>
diff --git a/aboutit-sample/src/main/java/com/snilius/aboutit/sample/AboutActivity.java b/aboutit-sample/src/main/java/com/snilius/aboutit/sample/AboutActivity.java
new file mode 100644
index 0000000..35ce5ab
--- /dev/null
+++ b/aboutit-sample/src/main/java/com/snilius/aboutit/sample/AboutActivity.java
@@ -0,0 +1,30 @@
+package com.snilius.aboutit.sample;
+
+import android.support.v7.app.ActionBarActivity;
+import android.os.Bundle;
+import android.support.v7.widget.Toolbar;
+import android.view.Menu;
+import android.view.MenuItem;
+
+import com.snilius.aboutit.AboutIt;
+import com.snilius.aboutit.L;
+
+
+public class AboutActivity extends ActionBarActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_about);
+
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+ getSupportActionBar().setTitle(R.string.about);
+
+ new AboutIt(this).app(R.string.app_name)
+ .buildInfo(BuildConfig.DEBUG, BuildConfig.VERSION_CODE, BuildConfig.VERSION_NAME)
+ .copyright("Snilius")
+ .libLicense("AboutIt", "Victor Häggqvist", L.AP2, "https://github.com/victorhaggqvist/aboutit")
+ .toTextView(R.id.about_text);
+ }
+}
diff --git a/aboutit-sample/src/main/java/com/snilius/aboutit/sample/MainActivity.java b/aboutit-sample/src/main/java/com/snilius/aboutit/sample/MainActivity.java
new file mode 100644
index 0000000..f7821b1
--- /dev/null
+++ b/aboutit-sample/src/main/java/com/snilius/aboutit/sample/MainActivity.java
@@ -0,0 +1,90 @@
+package com.snilius.aboutit.sample;
+
+import android.content.Intent;
+import android.support.v7.app.ActionBarActivity;
+import android.os.Bundle;
+import android.support.v7.widget.Toolbar;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.Spinner;
+
+import com.snilius.aboutit.AboutIt;
+import com.snilius.aboutit.L;
+
+
+public class MainActivity extends ActionBarActivity implements AdapterView.OnItemSelectedListener {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+ getSupportActionBar().setTitle(R.string.app_name);
+
+ Spinner spinner = (Spinner) findViewById(R.id.spinner);
+ spinner.setOnItemSelectedListener(this);
+ }
+
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.menu_main, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ int id = item.getItemId();
+
+ if (id == R.id.action_about) {
+ startActivity(new Intent(this, AboutActivity.class));
+ return true;
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+
+ @Override
+ public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+ switch (position) {
+ case 0: // all components
+ new AboutIt(this).app("Sample App")
+ .copyright("Example Business")
+ .year(2014)
+ .buildInfo(BuildConfig.DEBUG, BuildConfig.VERSION_CODE, BuildConfig.VERSION_NAME)
+ .description(R.string.sample_description)
+ .libLicense("AboutIt", "Victor Häggqvist", L.AP2, "https://github.com/victorhaggqvist/aboutit")
+ .toTextView(R.id.sample_text);
+ break;
+ case 1: // dynamic version only
+ new AboutIt(this).app("Sample App")
+ .copyright("Example Business")
+ .year(2014)
+ .buildInfo(BuildConfig.DEBUG, BuildConfig.VERSION_CODE, BuildConfig.VERSION_NAME)
+ .toTextView(R.id.sample_text);
+ break;
+ case 2: // library list
+ new AboutIt(this)
+ .libLicense("Lib2", "Random guy", L.MIT, "https://example.com")
+ .libLicense("AboutIt", "Victor Häggqvist", L.AP2, "https://github.com/victorhaggqvist/aboutit")
+ .toTextView(R.id.sample_text);
+ break;
+ case 3: // custom version
+ new AboutIt(this).app("Sample App")
+ .copyright("Example Business")
+ .buildInfo(BuildConfig.DEBUG, BuildConfig.VERSION_CODE, BuildConfig.VERSION_NAME)
+ .release("beta")
+ .toTextView(R.id.sample_text);
+ break;
+ }
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView<?> parent) {
+
+ }
+}
diff --git a/aboutit-sample/src/main/res/drawable-hdpi/ic_launcher.png b/aboutit-sample/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..96a442e
--- /dev/null
+++ b/aboutit-sample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/aboutit-sample/src/main/res/drawable-mdpi/ic_launcher.png b/aboutit-sample/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..359047d
--- /dev/null
+++ b/aboutit-sample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/aboutit-sample/src/main/res/drawable-xhdpi/ic_launcher.png b/aboutit-sample/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..71c6d76
--- /dev/null
+++ b/aboutit-sample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/aboutit-sample/src/main/res/drawable-xxhdpi/ic_launcher.png b/aboutit-sample/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4df1894
--- /dev/null
+++ b/aboutit-sample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/aboutit-sample/src/main/res/layout/activity_about.xml b/aboutit-sample/src/main/res/layout/activity_about.xml
new file mode 100644
index 0000000..ddd4863
--- /dev/null
+++ b/aboutit-sample/src/main/res/layout/activity_about.xml
@@ -0,0 +1,17 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context="com.snilius.aboutit.sample.AboutActivity">
+
+ <include layout="@layout/toolbar" />
+
+ <TextView
+ android:id="@+id/about_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/toolbar"
+ android:padding="16dp"
+ android:text="@string/hello_world" />
+
+</RelativeLayout>
diff --git a/aboutit-sample/src/main/res/layout/activity_main.xml b/aboutit-sample/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..9670712
--- /dev/null
+++ b/aboutit-sample/src/main/res/layout/activity_main.xml
@@ -0,0 +1,41 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ tools:context=".MainActivity">
+
+ <include layout="@layout/toolbar" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingBottom="@dimen/activity_vertical_margin"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin">
+
+ <TextView
+ android:id="@+id/description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:autoLink="web"
+ android:text="@string/description" />
+
+ <Spinner
+ android:id="@+id/spinner"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:entries="@array/examples"
+ android:paddingTop="16dp"
+ android:spinnerMode="dropdown" />
+
+ <TextView
+ android:id="@+id/sample_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="16dp" />
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/aboutit-sample/src/main/res/layout/toolbar.xml b/aboutit-sample/src/main/res/layout/toolbar.xml
new file mode 100644
index 0000000..0df34f8
--- /dev/null
+++ b/aboutit-sample/src/main/res/layout/toolbar.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/colorPrimary"
+ android:minHeight="?attr/actionBarSize"/>
diff --git a/aboutit-sample/src/main/res/menu/menu_main.xml b/aboutit-sample/src/main/res/menu/menu_main.xml
new file mode 100644
index 0000000..d46dc2e
--- /dev/null
+++ b/aboutit-sample/src/main/res/menu/menu_main.xml
@@ -0,0 +1,10 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ tools:context=".MainActivity">
+ <item
+ android:id="@+id/action_about"
+ android:orderInCategory="100"
+ android:title="@string/action_about"
+ app:showAsAction="never" />
+</menu>
diff --git a/aboutit-sample/src/main/res/values-w820dp/dimens.xml b/aboutit-sample/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/aboutit-sample/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+<resources>
+ <!-- Example customization of dimensions originally defined in res/values/dimens.xml
+ (such as screen margins) for screens with more than 820dp of available width. This
+ would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
+ <dimen name="activity_horizontal_margin">64dp</dimen>
+</resources>
diff --git a/aboutit-sample/src/main/res/values/dimens.xml b/aboutit-sample/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..47c8224
--- /dev/null
+++ b/aboutit-sample/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+<resources>
+ <!-- Default screen margins, per the Android Design guidelines. -->
+ <dimen name="activity_horizontal_margin">16dp</dimen>
+ <dimen name="activity_vertical_margin">16dp</dimen>
+</resources>
diff --git a/aboutit-sample/src/main/res/values/strings.xml b/aboutit-sample/src/main/res/values/strings.xml
new file mode 100644
index 0000000..5cf9045
--- /dev/null
+++ b/aboutit-sample/src/main/res/values/strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <string name="app_name">AboutIt Sample</string>
+ <string name="hello_world">Hello world!</string>
+ <string name="action_settings">Settings</string>
+ <string name="title_activity_about">AboutActivity</string>
+ <string name="description">This is a sampel application to demonstrate the AboutIt Library, https://github.com/victorhaggqvist/aboutit. A library to assist in creation/genaration of the about-page for your app.</string>
+ <string name="action_about">About</string>
+ <string name="about">About</string>
+ <string name="sample_description">Lorem ipsum dolor sit amet, pri ex vidit iuvaret. Cu mea nullam definiebas appellantur, ut mollis virtute accusata mea, eum eius omittantur et. Et errem dolorum his, mei inani convenire torquatos ei, nostrum explicari principes mel an. Qui modo eirmod alienum an, ius ex suas accusamus rationibus. Eros quas et vix, hinc everti no usu.</string>
+
+ <array name="examples">
+ <item>All components</item>
+ <item>Dynamic version</item>
+ <item>Library list</item>
+ <item>Custom version</item>
+ </array>
+
+</resources>
diff --git a/aboutit-sample/src/main/res/values/styles.xml b/aboutit-sample/src/main/res/values/styles.xml
new file mode 100644
index 0000000..6a7efa0
--- /dev/null
+++ b/aboutit-sample/src/main/res/values/styles.xml
@@ -0,0 +1,9 @@
+<resources>
+
+ <!-- Base application theme. -->
+ <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
+ <item name="colorPrimary">#4CAF50</item>
+ <item name="colorPrimaryDark">#1B5E20</item>
+ </style>
+
+</resources>
diff --git a/aboutit/.gitignore b/aboutit/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/aboutit/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/aboutit/build.gradle b/aboutit/build.gradle
new file mode 100644
index 0000000..db556e0
--- /dev/null
+++ b/aboutit/build.gradle
@@ -0,0 +1,24 @@
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion 21
+ buildToolsVersion "21.1.2"
+
+ defaultConfig {
+ minSdkVersion 14
+ targetSdkVersion 21
+ versionCode 1
+ versionName "1.0"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ compile 'com.android.support:appcompat-v7:21.0.3'
+}
diff --git a/aboutit/proguard-rules.pro b/aboutit/proguard-rules.pro
new file mode 100644
index 0000000..7873ee5
--- /dev/null
+++ b/aboutit/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /opt/android-sdk-linux/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/aboutit/src/androidTest/java/com/snilius/aboutit/ApplicationTest.java b/aboutit/src/androidTest/java/com/snilius/aboutit/ApplicationTest.java
new file mode 100644
index 0000000..c6f81f4
--- /dev/null
+++ b/aboutit/src/androidTest/java/com/snilius/aboutit/ApplicationTest.java
@@ -0,0 +1,13 @@
+package com.snilius.aboutit;
+
+import android.app.Application;
+import android.test.ApplicationTestCase;
+
+/**
+ * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
+ */
+public class ApplicationTest extends ApplicationTestCase<Application> {
+ public ApplicationTest() {
+ super(Application.class);
+ }
+} \ No newline at end of file
diff --git a/aboutit/src/main/AndroidManifest.xml b/aboutit/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..aa76a22
--- /dev/null
+++ b/aboutit/src/main/AndroidManifest.xml
@@ -0,0 +1,8 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.snilius.aboutit">
+
+ <application android:allowBackup="true" android:label="@string/app_name"
+ android:icon="@drawable/ic_launcher">
+
+ </application>
+
+</manifest>
diff --git a/aboutit/src/main/java/com/snilius/aboutit/AboutIt.java b/aboutit/src/main/java/com/snilius/aboutit/AboutIt.java
new file mode 100644
index 0000000..7d52191
--- /dev/null
+++ b/aboutit/src/main/java/com/snilius/aboutit/AboutIt.java
@@ -0,0 +1,232 @@
+package com.snilius.aboutit;
+
+import android.app.Activity;
+import android.text.util.Linkify;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * <h1>AboutIt</h1>
+ * A About-page creator
+ *
+ * <pre>
+ * {@code
+ * new AboutIt(this).app(R.string.app_name)
+ * .buildInfo(BuildConfig.DEBUG, BuildConfig.VERSION_CODE, BuildConfig.VERSION_NAME)
+ * .copyright("Example Business")
+ * .libLicense("AboutIt", "Victor Häggqvist", L.AP2, "https://github.com/victorhaggqvist/aboutit")
+ * .toTextView(R.id.about_text);
+ * }
+ * </pre>
+ *
+ * @author Victor Häggqvist
+ * @since 12/29/14
+ * @version 1.0
+ */
+public class AboutIt {
+
+ private String copyright = null;
+ private int year = 0;
+ private int endYear = 0;
+ private List<Lib> libs = new ArrayList<>();
+ private Activity activity;
+ private String appName = null;
+ private boolean debug;
+ private int versionCode;
+ private String versionName;
+ private String releaseName = null;
+ private String description = null;
+
+ /**
+ * Create a page generator
+ * @param activity The aboutpage activity
+ */
+ public AboutIt(Activity activity) {
+
+ this.activity = activity;
+ }
+
+ /**
+ * Generate text and put in @ref{about_text}
+ * @param about_text Resource it of destination TextView
+ */
+ @SuppressWarnings("StringConcatenationInsideStringBufferAppend")
+ public void toTextView(int about_text) {
+ TextView out = (TextView) activity.findViewById(about_text);
+ out.setAutoLinkMask(Linkify.WEB_URLS);
+
+ releaseName = "-"+(releaseName != null?releaseName:(debug?"debug":""));
+ endYear = endYear();
+
+ StringBuilder sb = new StringBuilder();
+ if (appName != null)
+ sb.append(appName+" v"+versionName+" ("+versionCode+releaseName+")\n");
+
+ if (copyright != null) {
+ sb.append("Copyright (c) ");
+ if (year != 0)
+ sb.append(year + (endYear != 0 ? " - " + endYear : "") + " ");
+ sb.append(copyright + "\n\n");
+ }
+
+ if (description != null)
+ sb.append(description+"\n\n");
+
+ // Sort library list alphabeticly by name
+ Collections.sort(libs, new Comparator<Lib>() {
+ @Override
+ public int compare(Lib lhs, Lib rhs) {
+ return lhs.name.compareTo(rhs.name);
+ }
+ });
+
+ for(Lib l:libs){
+ sb.append(l.name + " by " + l.author + " under " + l.license.display() + ", " + l.url + "\n");
+ }
+
+ out.setText(sb.toString());
+ }
+
+ /**
+ * Demiter what endyear to show
+ * @return year to show
+ */
+ private int endYear() {
+ if (endYear != 0) {
+ return endYear;
+ } else {
+ Calendar now = Calendar.getInstance();
+ int yearNow = now.get(Calendar.YEAR);
+ if (year == yearNow)
+ return 0;
+ else
+ return yearNow;
+ }
+ }
+
+ /**
+ * Get String by id
+ * @param stringid String id
+ * @return String
+ */
+ private String s(int stringid) {
+ return activity.getString(stringid);
+ }
+
+ /**
+ * Copyright name
+ * @param copyright Name
+ */
+ public AboutIt copyright(String copyright){
+ this.copyright = copyright;
+ return this;
+ }
+
+ /**
+ * Start copyright year.
+ * If there is no start year no year will be displayed at all.
+ * @param year Year
+ */
+ public AboutIt year(int year) {
+ this.year = year;
+ return this;
+ }
+
+ /**
+ * Add a library to the list
+ * @param name Name of Library
+ * @param author Author of library
+ * @param license Library licanse, defined by L
+ * @param url Url to or otherwise referense to library
+ * @see L
+ */
+ public AboutIt libLicense(String name, String author, L license, String url) {
+ libs.add(new Lib(name, author, license, url));
+ return this;
+ }
+
+ /**
+ * Appname to display
+ * @param stringresource A string resource id
+ */
+ public AboutIt app(int stringresource) {
+ this.appName = s(stringresource);
+ return this;
+ }
+
+ /**
+ * Appname to display
+ * @see #app(int)
+ */
+ public AboutIt app(String appName) {
+ this.appName = appName;
+ return this;
+ }
+
+ /**
+ * Set a custom release name. Override the default name eg. beta
+ * @param releaseName The release name
+ */
+ public AboutIt release(String releaseName){
+ this.releaseName = releaseName;
+ return this;
+ }
+
+ /**
+ * App build info. To be used in conjunktion with the BuildConfig class
+ * {@code .buildInfo(BuildConfig.DEBUG, BuildConfig.VERSION_CODE, BuildConfig.VERSION_NAME)}
+ *
+ * @param debug If is debug build
+ * @param versionCode Version code
+ * @param versionName Version name
+ */
+ public AboutIt buildInfo(boolean debug, int versionCode, String versionName) {
+ this.debug = debug;
+ this.versionCode = versionCode;
+ this.versionName = versionName;
+ return this;
+ }
+
+ /**
+ * A longer description
+ * @param stringresource A string resource id
+ */
+ public AboutIt description(int stringresource) {
+ description = s(stringresource);
+ return this;
+ }
+
+ /**
+ * A longer description
+ * @param description The description
+ * @see #description(int)
+ */
+ public AboutIt description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Holder for libraries
+ */
+ private class Lib {
+
+ final String name;
+ final String author;
+ final L license;
+ final String url;
+
+ public Lib(String name, String author, L license, String url) {
+
+ this.name = name;
+ this.author = author;
+ this.license = license;
+ this.url = url;
+ }
+ }
+}
diff --git a/aboutit/src/main/java/com/snilius/aboutit/L.java b/aboutit/src/main/java/com/snilius/aboutit/L.java
new file mode 100644
index 0000000..a66726b
--- /dev/null
+++ b/aboutit/src/main/java/com/snilius/aboutit/L.java
@@ -0,0 +1,24 @@
+package com.snilius.aboutit;
+
+/**
+ * License Definitions
+ * @author Victor Häggqvist
+ * @since 12/29/14
+ */
+public enum L {
+ AP2("Apache License, Version 2.0"), MIT("MIT"), GPL2("GPLv2"), GPL3("GPLv3");
+
+ private String mDisplayname;
+
+ L(String displayname) {
+ mDisplayname = displayname;
+ }
+
+ /**
+ * Get diaplayname for license
+ * @return displaname
+ */
+ public String display() {
+ return mDisplayname;
+ }
+}
diff --git a/aboutit/src/main/res/drawable-hdpi/ic_launcher.png b/aboutit/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..96a442e
--- /dev/null
+++ b/aboutit/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/aboutit/src/main/res/drawable-mdpi/ic_launcher.png b/aboutit/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..359047d
--- /dev/null
+++ b/aboutit/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/aboutit/src/main/res/drawable-xhdpi/ic_launcher.png b/aboutit/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..71c6d76
--- /dev/null
+++ b/aboutit/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/aboutit/src/main/res/drawable-xxhdpi/ic_launcher.png b/aboutit/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4df1894
--- /dev/null
+++ b/aboutit/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/aboutit/src/main/res/values/strings.xml b/aboutit/src/main/res/values/strings.xml
new file mode 100644
index 0000000..9b430f7
--- /dev/null
+++ b/aboutit/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+<resources>
+ <string name="app_name">AboutIt</string>
+</resources>
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..6356aab
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,19 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.0.0'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..1d3591c
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,18 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true \ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..0c71e76
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..91a7e26
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/img/img1.png b/img/img1.png
new file mode 100644
index 0000000..d34b259
--- /dev/null
+++ b/img/img1.png
Binary files differ
diff --git a/img/img2.png b/img/img2.png
new file mode 100644
index 0000000..6aa1d46
--- /dev/null
+++ b/img/img2.png
Binary files differ
diff --git a/img/img3.png b/img/img3.png
new file mode 100644
index 0000000..4778081
--- /dev/null
+++ b/img/img3.png
Binary files differ
diff --git a/img/img4.png b/img/img4.png
new file mode 100644
index 0000000..23744e4
--- /dev/null
+++ b/img/img4.png
Binary files differ
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..44acc19
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':aboutit-sample', ':aboutit'