Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
federicoiosue committed Mar 7, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 68d074a + 1715f3b commit aaa9fce
Showing 463 changed files with 17,289 additions and 14,374 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "CodeQL"

on:
push:
branches: [develop]
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
schedule:
- cron: '0 21 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['java']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
# uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

run: ./gradlew build


- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI
on: [push, pull_request]
jobs:
build-and-test:
name: Build and run tests
runs-on: macos-latest
steps:
- name: Checkout current develop branch
uses: actions/checkout@v1
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Run unit/instrumentation tests and coverage generation
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86
profile: Nexus 6
avd-name: test
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
disable-animations: true
script: ./gradlew -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest,androidx.test.filters.LargeTest jacocoTestReport --stacktrace
- name: SonarCloud static code and coverage analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonarqube -Dsonar.login="$SONAR_TOKEN"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -59,3 +59,5 @@ omniNotes/gradle.properties
*.log

\.directory

.gradletasknamecache
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -10,4 +10,6 @@ AgiMaulana (https://github.com/AgiMaulana)

Richard Zhang (https://github.com/richardzhanguw)

Sachin Jethanandani (https://github.com/sachin-0102)

See [pull requests](https://github.com/federicoiosue/Omni-Notes/pulls?q=is%3Aclosed) for all contributions.
64 changes: 52 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,10 +3,12 @@
Omni-Notes
==========

![SLicense](https://img.shields.io/badge/License-GPLv3-red.svg)
![License](https://img.shields.io/badge/License-GPLv3-red.svg)
[![CI workflow](https://github.com/federicoiosue/Omni-Notes/workflows/CI/badge.svg)](https://github.com/federicoiosue/Omni-Notes/actions?query=workflow%3ACI)
[![CodeQL Workflow](https://github.com/federicoiosue/Omni-Notes/workflows/CodeQL/badge.svg)](https://github.com/federicoiosue/Omni-Notes/actions?query=workflow%3ACodeQL)
[![Sonarcloud Coverage](https://sonarcloud.io/api/project_badges/measure?project=omni-notes&metric=coverage)](https://sonarcloud.io/dashboard?id=omni-notes)
[![Sonarcloud Maintainability](https://sonarcloud.io/api/project_badges/measure?project=omni-notes&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=omni-notes)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/omni-notes/localized.png)](https://crowdin.com/project/omni-notes)
[![Build Status](https://travis-ci.org/federicoiosue/Omni-Notes.svg?branch=develop)](https://travis-ci.org/federicoiosue/Omni-Notes)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8ade707d00ef468fa79d3f6b622444b5)](https://www.codacy.com/app/federico-iosue/Omni-Notes?utm_source=github.com&utm_medium=referral&utm_content=federicoiosue/Omni-Notes&utm_campaign=Badge_Grade)
[![GitHub release](https://img.shields.io/github/release/federicoiosue/omni-notes.svg)](https://github.com/federicoiosue/Omni-Notes/releases/latest)

Note taking <b>open-source</b> application aimed to have both a <b>simple interface</b> but keeping <b>smart</b> behavior.
@@ -15,13 +17,18 @@ The project was inspired by the absence of such applications compatible with old

**Follow the developments and post your comments and advice on Facebook Community at https://www.facebook.com/OmniNotes**

*Help to keep translations updated is always welcome, if you want give a hand checkout the translation project on **https://translate.omninotes.app.** *
Help to keep translations updated is always welcome, if you want give a hand checkout the translation project on *https://translate.omninotes.app.*

<a href="https://f-droid.org/repository/browse/?fdid=it.feio.android.omninotes.foss" target="_blank">
<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="90"/></a>
<a href="https://play.google.com/store/apps/details?id=it.feio.android.omninotes" target="_blank">
<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="90"/></a>

If you're willing to help speeding up developments please also opt-in for the Alpha version of the app following continuous delivery principles:

<a href="https://play.google.com/store/apps/details?id=it.feio.android.omninotes.alpha" target="_blank">
<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="90"/></a>

## Features

Currently the following functions are implemented:
@@ -70,21 +77,48 @@ Look into the wiki for GIFs-based tutorials: [LINK](https://github.com/federicoi
Watch the following terminal session recording on how to compile distributable files
[![asciicast](https://asciinema.org/a/102898.png)](https://asciinema.org/a/102898)

To be sure that build environment is fully compliant with the project the following command creates a container with all the needed tools to compile the code:

```
cd {project-folder}; rm local.properties; docker rm android-omninotes; docker run -v $PWD:/workspace --name android-omninotes tabrindle/min-alpine-android-sdk:latest bash -c "mkdir -p ~/.android && touch ~/.android/repositories.cfg && yes | sdkmanager --update &>/dev/null && cd /workspace && ./gradlew clean build --stacktrace -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
```

## Test

To execute all tests included into the project connect a device or emulator, then run the following command:

```shell
./gradlew connectedAndroidTest
./gradlew testAll
```

### Testing Pyramid

To speedup the development more levels of testing are available following the [testing pyramid approach](https://martinfowler.com/articles/practical-test-pyramid.html), each type test requires more time than the previous one.

### Unit Tests
```shell
./gradlew --stacktrace test
```

### Integration Tests
```shell
./gradlew --stacktrace -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.LargeTest connectedAndroidTest
```

### UI Tests
```shell
./gradlew --stacktrace -Pandroid.testInstrumentationRunnerArguments.annotation=androidx.test.filters.LargeTest connectedPlayDebugAndroidTest
```
Notice that in this case I specified a single flavor to run tests on. This could be a useful and faster approach when you're testing specific flavor features.

## Contributing

Due to the fact that I'm using [gitflow](https://github.com/nvie/gitflow) as code versioning methodology, you as developer should **always** start working on [develop branch](https://github.com/federicoiosue/Omni-Notes/tree/develop) that contains the most recent changes.

There are many features/improvements that are not on **my** roadmap but someone else could decide to work on them anyway: hunt for issues tagged as [Help Wanted](https://github.com/federicoiosue/Omni-Notes/issues?utf8=✓&q=label%3A"Help+wanted") to find them!

Feel free to add yourself to [contributors.md](https://github.com/federicoiosue/Omni-Notes/blob/develop/contributors.md) file.
Feel free to add yourself to [contributors.md](https://github.com/federicoiosue/Omni-Notes/blob/develop/CONTRIBUTORS.md) file.

### New feature or improvements contributions

@@ -105,7 +139,6 @@ See the [related section](#test) for more informations or this two pull requests
When forking the project you'll have to modify some files that are strictly dependent from my own development / build / third-party-services environment. Files that need some attention are the following:

- *gradle.properties*: this is overridden by another file with the same name inside the *omniNotes* module. You can do the same or leave as it is, any missing property will let the app gracefully fallback on a default behavior.
- *.travis.yml*: if you use [TravisCI](https://travis-ci.org/) as continuous integration platform and a SonarQUBE instance for code quality analysis you'll have to modify this file according to your needs.

## Code quality

@@ -120,7 +153,6 @@ Pull requests will be automatically analyzed and rejected if they'll rise the co
They're all listed into the [build.gradle](https://github.com/federicoiosue/Omni-Notes/blob/develop/omniNotes/build.gradle) file but due to the fact that many of the dependences have been customized by me I'd like to say thanks here to the original developers of these great libraries:

* https://github.com/RobotiumTech/robotium
* https://github.com/flavienlaurent/datetimepicker
* https://github.com/LarsWerkman/HoloColorPicker
* https://github.com/keyboardsurfer/Crouton
* https://github.com/romannurik/dashclock/wiki/API
@@ -130,11 +162,9 @@ They're all listed into the [build.gradle](https://github.com/federicoiosue/Omni
* https://github.com/greenrobot/EventBus
* https://github.com/futuresimple/android-floating-action-button
* https://github.com/keyboardsurfer
* https://github.com/nhaarman/ListViewAnimations
* https://github.com/bumptech/glide
* https://github.com/neopixl/PixlUI
* https://github.com/afollestad/material-dialogs
* https://github.com/JakeWharton/butterknife
* https://github.com/ical4j
* https://github.com/square/leakcanary
* https://github.com/pnikosis/materialish-progress
@@ -147,19 +177,29 @@ They're all listed into the [build.gradle](https://github.com/federicoiosue/Omni
* https://github.com/mrmans0n/smart-location-lib


## Mentioned on

[XDA](https://www.xda-developers.com/omni-notes-the-open-source-note-app/)
[Android Authority](https://www.androidauthority.com/best-note-taking-apps-for-android-205356/)
[Droid Advisor](https://droidadvisor.com/omni-notes-note-taking-app/)
[Addictive Tips](https://www.addictivetips.com/android/note-taking-apps-for-android/)
[Techalook](https://techalook.com/apps/best-sticky-notes-android-iphone/)
[DZone](https://dzone.com/articles/amazing-open-source-android-apps-written-in-java)
[Slash Gear](https://www.slashgear.com/best-note-taking-apps-for-android-phones-and-tablets-04529297/)
[quaap.com](https://quaap.com/D/use-fdroid)

## Developed with love and passion by


* Federico Iosue - [Website](https://federico.iosue.it)
* [Other contributors](https://github.com/federicoiosue/Omni-Notes/blob/master/https://github.com/federicoiosue/Omni-Notes/blob/master/CONTRIBUTORS.md)
* [Other contributors](https://github.com/federicoiosue/Omni-Notes/blob/develop/CONTRIBUTORS.md)



## License


Copyright 2013-2019 Federico Iosue
Copyright 2013-2021 Federico Iosue

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
10 changes: 1 addition & 9 deletions assets/translations/arrays.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013-2019 Federico Iosue ([email protected])
~ Copyright (C) 2013-2020 Federico Iosue ([email protected])
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
@@ -51,14 +51,6 @@
<item >Notes list</item>
</string-array>

<string-array name="text_size">
<item >Smallest</item>
<item >Small</item>
<item >Default</item>
<item >Large</item>
<item >Largest</item>
</string-array>

<string-array name="attachments_actions">
<item>Share</item>
<item>Delete</item>
4 changes: 2 additions & 2 deletions assets/translations/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
~ Copyright (C) 2013-2019 Federico Iosue ([email protected])
~ Copyright (C) 2013-2020 Federico Iosue ([email protected])
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
@@ -89,7 +89,7 @@
<string name="data_export_failed">Data backup failed: check logcat for details</string>
<string name="data_import_completed">Data restore completed</string>
<string name="click_to_refresh_application">Click to refresh application</string>
<string name="backup_existing">Backup already exist. It\'ll be overwritten</string>
<string name="backup_existing">Backup already exists. It\'ll be overwritten</string>
<string name="tag">Tag</string>
<string name="tags">Tags</string>
<string name="add_tag">Add tags</string>
26 changes: 16 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2013-2019 Federico Iosue ([email protected])
* Copyright (C) 2013-2020 Federico Iosue ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,15 +16,18 @@
*/

buildscript {
ext.kotlin_version = '1.5.31'
repositories {
jcenter()
mavenLocal()
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6"
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0"
classpath 'com.adarshr:gradle-test-logger-plugin:2.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
// Exclude the version that the android plugin depends on.
configurations.classpath.exclude group: 'com.android.tools.external.lombok'
@@ -33,9 +36,9 @@ buildscript {
allprojects {
repositories {
mavenLocal()
jcenter()
maven {url "https://jitpack.io"}
maven {url "http://dl.bintray.com/tbruyelle/tbruyelle" }
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://plugins.gradle.org/m2/" }
google()
}
}
@@ -45,10 +48,13 @@ sonarqube {
properties {
property "sonar.projectName", "Omni Notes"
property "sonar.projectKey", "omni-notes"
property "sonar.organization", "federicoiosue-github"
property 'sonar.projectVersion', project.VERSION_NAME
property "sonar.host.url", "https://sonarcloud.io"
property 'sonar.sourceEncoding', 'UTF-8'
property 'sonar.language', 'java'
property 'sonar.coverage.jacoco.xmlReportPaths', "**/build/reports/coverage/**/debug/report.xml"
property 'sonar.exclusions', '**/src/main/assets/**/*.*'
property 'sonar.test.exclusions', '**/src/test/**/*.*,**/src/androidTest/**/*.*'
}
}

3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -23,3 +23,6 @@ Further developments will include:
☆ You can find a complete changelog inside the application settings menu!

If you need some help on how to use the application you'll find everything you need in the Help Online section

Anti Features:
* Tracking - 'Error reporting' and 'Share anonymous data' are opt-out, enabled by default in Settings - Privacy.
Loading

0 comments on commit aaa9fce

Please sign in to comment.