Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(android): migrate to gradle #44

Merged
merged 63 commits into from Feb 6, 2020
Merged

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Jan 28, 2020

  • Migrate to gradle
  • Build using Titanium SDK 9.0.0
  • Update sqlcipher to version 4.3.0

appcelerator.encrypteddatabase-android-4.0.0.zip

JIRA Ticket

Copy link
Contributor

@jquick-axway jquick-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass

@sgtcoolguy
Copy link
Contributor

@garymathews Sorry for tossing a million commits onto your PR and force-pushing. I really wanted to get all the linting/tests/build stuff in before we cut new releases. I assume the only expected change at this point is the SDK version to use to build with the new xml namespace fix?

@build
Copy link

build commented Feb 5, 2020

Warnings
⚠️ SDK version declared in Jenkinsfile (9.0.0.v20200128095338) does not match iOS' titanium.xcconfig value (7.5.2.GA)
Messages
📖

💾 Here are the artifacts produced:

📖

✅ All tests are passing
Nice one! All 4 tests are passing.

📖 🎉 - congrats on your new release

Dependencies with modified semantic versioning:

@commitlint/cli

Author: Mario Nebl

Description: Lint your commit messages

Homepage: https://github.com/conventional-changelog/commitlint#readme

Createdover 2 years ago
Last Updated21 days ago
LicenseMIT
Maintainers4
Releases60
Direct Dependencies@commitlint/format, @commitlint/lint, @commitlint/load, @commitlint/read, babel-polyfill, chalk, get-stdin, lodash, meow, resolve-from and resolve-global
Keywordsconventional-changelog, commitlint and cli
README

Lint commit messages

@commitlint/cli

Getting started

npm install --save-dev @commitlint/cli @commitlint/config-angular
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js

Consult docs/cli for comprehensive documentation.

@commitlint/config-conventional

Author: Mario Nebl

Description: Shareable commitlint config enforcing conventional commits

Homepage: https://github.com/conventional-changelog/commitlint#readme

Createdabout 2 years ago
Last Updatedabout 1 month ago
LicenseMIT
Maintainers4
Releases27
Direct Dependenciesconventional-changelog-conventionalcommits
Keywordsconventional-changelog, commitlint, commitlint-config and angular
README

Lint your conventional commits

@commitlint/config-conventional

Shareable commitlint config enforcing conventional commits.
Use with @commitlint/cli and @commitlint/prompt-cli.

⚠️
IMPORTANT This is a direct replacement for @commitlint/config-angular prior to version 4. config-angular diverged from the conventional commit convention as of version 5. See #146 for details.

Getting started

npm install --save-dev @commitlint/config-conventional @commitlint/cli
echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js

Rules

Problems

The following rules are considered problems for @commitlint/config-conventional and will yield a non-zero exit code when not met.

Consult docs/rules for a list of available rules.

type-enum

  • condition: type is found in value

  • rule: always

  • value

    [
      'build',
      'ci',
      'chore',
      'docs',
      'feat',
      'fix',
      'perf',
      'refactor',
      'revert',
      'style',
      'test'
    ]
echo "foo: some message" # fails
echo "fix: some message" # passes

type-case

  • description: type is in case value
  • rule: always
  • value
      'lowerCase'
echo "FIX: some message" # fails
echo "fix: some message" # passes

type-empty

  • condition: type is empty
  • rule: never
echo ": some message" # fails
echo "fix: some message" # passes

scope-case

  • condition: scope is in case value
  • rule: always
  'lowerCase'
echo "fix(SCOPE): some message" # fails
echo "fix(scope): some message" # passes

subject-case

  • condition: subject is in one of the cases ['sentence-case', 'start-case', 'pascal-case', 'upper-case']
  • rule: never
echo "fix(SCOPE): Some message" # fails
echo "fix(SCOPE): Some Message" # fails
echo "fix(SCOPE): SomeMessage" # fails
echo "fix(SCOPE): SOMEMESSAGE" # fails
echo "fix(scope): some message" # passes
echo "fix(scope): some Message" # passes

subject-empty

  • condition: subject is empty
  • rule: never
echo "fix:" # fails
echo "fix: some message" # passes

subject-full-stop

  • condition: subject ends with value
  • rule: never
  • value
  '.'
echo "fix: some message." # fails
echo "fix: some message" # passes

header-max-length

  • condition: header has value or less characters
  • rule: always
  • value
  72
echo "fix: some message that is way too long and breaks the line max-length by several characters" # fails
echo "fix: some message" # passes

@seadub/clang-format-lint

Author: Christopher Williams

Description: Validate and/or fix formatting of files via clang-format

Homepage: https://github.com/sgtcoolguy/clang-format-lint#readme

Created4 months ago
Last Updated4 months ago
LicenseMIT
Maintainers1
Releases2
Direct Dependenciescommander, glob and p-limit
Keywordsclang, clang-format and lint
README

clang-format-lint

A very simple wrapper around the clang-format npm package/binary.

Intended to be used to either validate existing files, or automatically fix the formatting on them.

Usage:

npx clang-format-lint [--fix] [--exec-limit [limit]] glob[ glob]*

e.g. To check if your source files match your formatting rules:

npx clang-format-lint android/src/**/*.java

e.g. To ensure your source files match your formatting rules:

npx clang-format-lint --fix android/src/**/*.java

New dependencies added: @commitlint/cli, @commitlint/config-conventional, @seadub/clang-format-lint, @seadub/danger-plugin-titanium-module, clang-format, commitizen, husky, lint-staged and titanium-docgen.

clang-format

Author: Unknown

Description: node wrapper around clang-format

Homepage: https://github.com/angular/clang-format#readme

Createdalmost 5 years ago
Last Updated9 days ago
LicenseApache-2.0
Maintainers3
Releases65
Direct Dependenciesasync, glob and resolve
README

Build Status

clang-format

node.js module which wraps the native clang-format executable.

From the command-line:

$ npm install -g clang-format
$ clang-format -help

If your platform isn't yet supported, you can create the native binary from
the latest upstream clang sources, make sure it is stripped and optimized
(should be about 1.4MB as of mid-2015) and send a pull request to add it.

Checking formatting

Ensuring that changes to your code are properly formatted is an important part
of your development workflow. Note that the check-clang-format and
git-clang-format commands require Python to be globally available.

We recommend using a git pre-commit hook. You can configure this as follows:

  1. add a precommit script to your package.json file:

    "scripts": {
        "precommit": "check-clang-format"
    }

    By default, the user gets an error instructing them to run
    ./node_modules/.bin/git-clang-format. You may find it more ergonomic to set
    up a package.json script, eg.
    "scripts": { "format": "git-clang-format" }

    In this case, add a second argument to the "precommit" script, giving the
    error you'd like to print for users, eg.

    "precommit": "check-clang-format \"yarn format\""

  2. Add a devDependency on the husky package, which will add a
    .git/hooks/pre-commit script, which in turn triggers the precommit
    package.json script to run whenever someone adds a commit in this repository:

    $ yarn add -D husky

    or

    npm install --save-dev husky

Why do this in a pre-commit hook? For one thing, it's faster to run
clang-format only on the changed files, especially as the repository grows.
Also, this lets you upgrade clang-format or change your settings without
needing to re-format the entire repository, while still enforcing that later
changes follow the new style.

Globbing files

$ clang-format --glob=folder/**/*.js

This will run clang-format once per file result, and show the total
formatted files at the end.
See node-glob for globbing semantics.

Compiling clang-format

For Linux, compile a statically linked MinSizeRel build:

cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_BUILD_STATIC=true ..
ninja clang-format

For Mac OS X, static linking is not required.

Windows

Windows snapshot builds to include in the release can be found at the
LLVM website.

Configure with:

cmake -G "Visual Studio 12" -DCMAKE_BUILD_TYPE=MinSizeRel ..

In the generated Visual Studio project, search for the clang-format binary in
the Solution Explorer window, right click and choose Build.

commitizen

Author: Jim Cummins

Description: Git commit, but play nice with conventions.

Homepage: https://github.com/commitizen/cz-cli

Createdalmost 5 years ago
Last Updated7 months ago
LicenseMIT
Maintainers5
Releases64
Direct Dependenciescachedir, cz-conventional-changelog, dedent, detect-indent, find-node-modules, find-root, fs-extra, glob, inquirer, is-utf8, lodash, minimist, shelljs, strip-bom and strip-json-comments
Keywordscommit, pretty, format, conventional changelog and commitizen
This README is too long to show.

husky

Author: Typicode

Description: Prevents bad commit or push (git hooks, pre-commit/precommit, pre-push/prepush, post-merge/postmerge and all that stuff...)

Homepage: https://github.com/typicode/husky#readme

Createdover 5 years ago
Last Updated13 days ago
LicenseMIT
Maintainers1
Releases150
Direct Dependencieschalk, ci-info, compare-versions, cosmiconfig, find-versions, opencollective-postinstall, pkg-dir, please-upgrade-node, slash and which-pm-runs
Keywordsgit, hook, hooks, pre-commit, precommit, post-commit, postcommit, pre-push, prepush, post-merge, postmerge, test and lint
This README is too long to show.

lint-staged

Author: Andrey Okonetchnikov

Description: Lint files staged by git

Homepage: https://github.com/okonet/lint-staged#readme

Createdabout 4 years ago
Last Updated6 days ago
LicenseMIT
Maintainers1
Releases139
Direct Dependencieschalk, commander, cosmiconfig, debug, dedent, execa, listr, log-symbols, micromatch, normalize-path, please-upgrade-node, string-argv and stringify-object
Keywordslint, git, staged, eslint, prettier, stylelint, code, quality, check, format and validate
This README is too long to show.

titanium-docgen

Author: Axway Appcelerator

Description: Generates Titanium API documentation in different formats

Homepage: https://github.com/appcelerator/docs-devkit#readme

Created6 months ago
Last Updatedabout 10 hours ago
LicenseApache-2.0
Maintainers1
Releases11
Direct Dependenciescolors, ejs, js-yaml, markdown-it and node-appc
Keywordstitanium, docgen, documentation and docs
README

titanium-docgen

Generates Titanium API documentation in different formats

Installation

npm i titanium-docgen -D

Usage

node docgen [--addon-docs <PATH_TO_YAML_FILES] [--css <CSS_FILE>] [--format <EXPORT_FORMAT>] [--output <OUTPUT_DIRECTORY>] <PATH_TO_YAML_FILES>

For a description of each option. run docgen --help.

Supported formats

Format Description
addon
changes
html HTML files for the official docs at https://docs.appcelerator.com
jsca JSCA content assist metadata
jsduck https://github.com/senchalabs/jsduck
json JSON metadata file
json-raw Same as json, but with no pre-rendered markdown
modulehtml
parity
solr Solr search index
typescript TypeScript type definition file

@seadub/danger-plugin-titanium-module

Author: Chris Williams

Description: Eslint your code with Danger

Homepage: https://github.com/sgtcoolguy/danger-plugin-titanium-module#readme

Created5 days ago
Last Updated1 day ago
LicenseMIT
Maintainers1
Releases6
Direct Dependenciesfs-extra and semver
Keywordsdanger, danger-plugin and eslint
README

danger-plugin-titanium-module

npm version
semantic-release

Eslint your code with Danger

Usage

Install:

yarn add danger-plugin-titanium-module --dev
# OR
npm install danger-plugin-titanium-module -D

At a glance:

// dangerfile.js
import lint from 'danger-plugin-titanium-module'

await lint()

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.

Generated by 🚫 dangerJS against 79486ad

@tidev tidev deleted a comment from build Feb 5, 2020
@garymathews
Copy link
Contributor Author

@sgtcoolguy Yeah, but I decided to update sqlcipher too. Since customers usually ask us to update it every so often

@sgtcoolguy
Copy link
Contributor

@garymathews i kept your commits in here too, including the sqlcipher update

@ssjsamir ssjsamir self-requested a review February 6, 2020 11:12
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed able to build module and use the example application to test the module.

const dbobj = require('appcelerator.encrypteddatabase');

var win = Ti.UI.createWindow({ backgroundColor: 'white' });
var btn = Ti.UI.createButton({ title: 'Trigger' });

btn.addEventListener('click', accessDatabase);

win.add(btn);
win.open();

function accessDatabase() {
	dbobj.setPassword('secret');

	Ti.API.info('Opening DB ...');
	const instance = dbobj.open('test.db');

	instance.execute('CREATE TABLE IF NOT EXISTS user(name string, phone string);');
	instance.execute('insert into user (name, phone) values("oz", json(\'{"cell":"+491765", "home":"+498973"}\'));');

	const dataToInsertHandle = instance.execute('select user.phone from user where user.name==\'oz\'');
	const result = dataToInsertHandle.isValidRow() ? dataToInsertHandle.fieldByName('phone') : null;

	alert('Fetched data: ' + result);
	Ti.API.info('Closing DB ...');
	instance.close();

Test Environment

MacOS Catalina: 10.15.1 beta
Xcode: 11.3
Java Version: 1.8.0_131
Android NDK: 18.1.5063045
Node.js: 10.16.3
"NPM":"4.2.15-1","CLI":"7.1.2-7"
Pixel xl (7.1.1) Emulator

@ssjsamir ssjsamir merged commit ff743b7 into tidev:master Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants