GithubHelp home page GithubHelp logo

gregswindle / cookiemaster Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 66 KB

Native Android extraction from com.cordova.plugins.cookiemaster.CookieMaster for reuse in native Android as well as Cordova using the Android Studio Library directory structure

License: MIT License

Java 92.40% Groovy 7.60%

cookiemaster's Introduction

CookieMaster

Native Android extraction from com.cordova.plugins.cookiemaster.CookieMaster for reuse in native Android as well as Cordova.

License Build Status Coverage Status Greenkeeper badge


1. Features

1.1. Get a cookie by URL and name

String url = "https://example.com/cookies";
String cookieName = "foo";
HttpCookie cookie = CookieMaster.getCookieValue(url, cookieName);

1.2. Set a cookie by URL and name

String url = "https://example.com/cookies";
String cookieName = "foo";
String cookieValue = "bar";
CookieMaster.getCookieValue(url, cookieName, cookieValue);

1.3. Set a cookie with JSON

// json is a serialized HttpCookie
HttpCookie cookie = CookieMaster.cookieFromJson(json);

1.4. Serialize an HttpCookie to JSON

// cookie is an HttpCookie
String jsonCookie = CookieMaster.cookieToJson(cookie);

1.5. Clear all cookies

CookieMaster.clear();

2. Setup

Releases are will be published to bintray jcenter and maven central.

JCenter Maven Central

2.1. Maven

<dependency>
  <groupId>com.verizon.api</groupId>
  <artifactId>CookieMaster</artifactId>
  <version>0.1.0</version>
</dependency>

2.2. Gradle

Add com.verizon.api:CookieMaster to your build.gradle's dependencies:

compile 'com.verizon.api:CookieMaster:0.1.0'

3. Snapshots

You can use snapshot versions through JitPack.

3.1. Go to JitPack project page.

3.2. Select Commits section and click Get it on commit you want to use (top one - the most recent).

3.3. Follow displayed instructions: add repository and change dependency (NOTE: due to JitPack convention artifact group will be different).

4. Recommended prerequisites

The following dependencies are recommended for consistent build, test, and deploy tasks:

Install Homebrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

4.2. jenv

Install jenv:

$ brew install jenv

4.3. java

Install Java from a Terminal:

$ brew cask install java

โœ… Install several versions of Java

If you want to test this library on several versions of Java, the article Install Multiple Java Versions on Mac provides clear yet detailed instructions.

4.4. gradle

Install gradle for automated build and dependency management:

$ brew install gradle

5. Reports ๐Ÿ“ˆ

โœ… Generate a project report

Generate project reports for all dependencies, properties, and tasks in your <project-root>/build/reports/project directory:

$ ./gradlew projectReport

5.1. Code quality and test reports

Use the following command to run code quality plugins and tests. If quality checks were activated (asked during generation) do check before pushing to avoid build failures on travis. Moreover, it's easy to always keep everything clean instead of doing it before release.

$ ./gradlew check

5.2. Project dependency updates

Checks whether your project is using the latest available versions in its dependencies. If not, you'll see which upgrades are available.

$ ./gradlew dependencyUpdates

5.3. Project dependencies tree in a Terminal

Print the product's dependency tree in your console.

$ ./gradlew dependencies

5.4. Dependency reports for Web browsers

Generate a Dependency Report in HTML and launch it in your default browser.

โœ… Analyze dependency conflicts

To analyze conflicts, click on dependency name to activate a dependencyInsight pop-up in the Dependency Report.

$ ./gradlew showDependenciesTree

6. Dependency management

๐Ÿ”— Install libraries to your local maven repository. Useful for referencing by other projects (for testing without releasing library).

$ ./gradlew install

7. Deployment

๐ŸŒ Publish the library to jFrog Bintray (and therefore the world).

โš ๏ธ Read the Release process first!

Before publishing the library, read the section Release process in the generator-lib-java README.md.

$ ./gradlew release

๐Ÿ”– Tutorial

Spring has a good tutorial called Building Android Projects with Gradle.


java lib generator

cookiemaster's People

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.