Git Product home page Git Product logo

css4j-awt's Introduction

CI workflow

css4j

This project provides implementations of APIs similar to W3C/WHATWG's:

Unless otherwise noted, this software is provided under a BSD-style license (see also NOTICE.txt for included files that have a different licensing).


Features

The functionality of this library can be divided in the following areas:

  • A CSSOM API very similar to the standard W3C CSS Object Model API, that allows accessing the CSS information (style sheets, inline styles, etc.) in a DOM Document, as well as getting computed styles for its elements.

  • A CSS-enabled native DOM implementation.

  • A DOM wrapper that can be used with an external DOM implementation.

  • A device profile API to encapsulate target device-specific information.

In separate modules you can find:


Java™ Runtime Environment requirements

All the classes in the binary package have been compiled with a Java compiler set to 1.8 compiler compliance level, except the module-info.java file.

Building the library requires JDK 11 or higher.


Build from source

To build css4j from the code that is currently at the Git repository, JDK 11 or later is needed. You can run a variety of Gradle tasks with the Gradle wrapper (on Windows shells you can omit the ./):

  • ./gradlew build (normal build)
  • ./gradlew publishToMavenLocal (to install in local Maven repository)
  • ./gradlew copyJars (to copy jar files into a top-level jar directory)
  • ./gradlew testOn8 (run tests with Java 8)
  • ./gradlew jacocoTestReport (produces a test coverage report in the build/reports/jacoco/test/html directory)
  • ./gradlew publish (deploys to a Maven repository, as described in the publishing.repositories.maven block of build.gradle)

Usage from a Gradle project

If your Gradle project depends on css4j, you can use this project's own Maven repository in a repositories section of your build file:

repositories {
    maven {
        url "https://css4j.github.io/maven/"
        mavenContent {
            releasesOnly()
        }
        content {
            includeGroup 'io.sf.carte'
            includeGroup 'io.sf.jclf'
        }
    }
}

please use this repository only for the artifact groups listed in the includeGroup statements.

Then, in your build.gradle file:

dependencies {
    api "io.sf.carte:css4j:${css4jVersion}"
}

where css4jVersion would be defined in a gradle.properties file.


Usage from a Maven build

If you build your project (that depends on css4j) with Maven, please note that neither css4j nor some of its dependencies are in Maven Central.

The easiest path is to add the css4j Maven repository to your project's POM:

<repositories>
    <repository>
        <id>css4j</id>
        <name>CSS4J repository</name>
        <url>https://css4j.github.io/maven/</url>
    </repository>
</repositories>

And then, add the following to the <dependencies> section of your pom.xml:

<!-- This artifact is not in Maven Central -->
<dependency>
    <groupId>io.sf.carte</groupId>
    <artifactId>css4j</artifactId>
    <version>${css4j.version}</version>
</dependency>

In your IDE

When running the test suite from your IDE, you may want to exclude the Fuzz tag from your JUnit Runner configuration, to avoid bootstrapping the fuzzer each time you run it.


Fuzzing

This library includes a Jazzer-based fuzzing test that can be run with

./gradlew fuzzer

as well as within your IDE (in the latter case you have to set the JAZZER_FUZZ environment variable).

Beware that many of the crashes that it finds are related to the coverage instrumentation and cannot be reproduced outside of the fuzzer.


Software dependencies

In case that you do not use a Gradle or Maven build (which would manage the dependencies according to the relevant .module or .pom files), the required and optional library packages are the following:

Compile-time dependencies

Test dependencies


Website

For more information please see https://css4j.github.io/

css4j-awt's People

Contributors

carlosame avatar dependabot[bot] avatar

Watchers

 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.