├── .gitignore ├── metadata.py ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | *.log 3 | .DS_Store 4 | 5 | # sbt specific 6 | .cache/ 7 | .history/ 8 | .lib/ 9 | dist/* 10 | target/ 11 | lib_managed/ 12 | src_managed/ 13 | project/boot/ 14 | project/plugins/project/ 15 | 16 | # Scala-IDE specific 17 | .scala_dependencies 18 | .worksheet 19 | 20 | # project specific 21 | .access-token 22 | -------------------------------------------------------------------------------- /metadata.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # by Erik Osheim 5 | # 6 | # Reads README.md, and writes a README.md.new. If the format of 7 | # README.md changes, this script may need modifications. 8 | # 9 | # Currently it rewrites each section, doing the following: 10 | # 1. alphabetizing 11 | # 2. querying GitHub for stars and days since active 12 | # 3. formatting the link title to show this info 13 | # 4. bolding projects with lots of stars 14 | # 15 | # Once README.md has the stars/days info in the links, the 16 | # repo_regex will need slight modification. 17 | # 18 | # In order to use GH authentication, create a file in this directory 19 | # called .access-token, whose contents are: "$user:$token" where $user 20 | # is your github username, and $token is a Personal Access Token. 21 | 22 | import base64 23 | import datetime 24 | import json 25 | import os.path 26 | import random 27 | import re 28 | import shutil 29 | import sys 30 | import urllib2 31 | 32 | # we use these regexes when "parsing" README.md 33 | empty_regex = re.compile(r"^ *\n$") 34 | section_regex = re.compile(r"^###? (.+)\n$") 35 | repo_regex = re.compile(r"^\* (?:\*\*)?\[?([^*★]+[^ ★])(?: ★ ([^ ]+) ⧗ ([^ *]+))?\]\((.+?)\)(?:\*\*)?(?: (?:-|—|–) (.+))?\n$") 36 | end_regex = re.compile(r"^# .+\n$") 37 | github_regex = re.compile(r"^https://github.com/(.+?)/(.+?)(?:/?)$") 38 | 39 | # some paths 40 | readme_path = 'README.md' 41 | temp_path = 'README.md.new' 42 | 43 | # these will be updated if .access-token exists. 44 | user = None 45 | token = None 46 | 47 | # use fake to avoid hitting github API 48 | fake = True 49 | 50 | # whether to query all projects, or just those lacking scores/days. 51 | full_update = False 52 | 53 | # right now. 54 | now = datetime.datetime.now() 55 | 56 | # ask github for the number of stargazers, and days since last 57 | # activity, for the given github project. 58 | def query(owner, name): 59 | if fake: 60 | print ' {0}/{1}: ok'.format(owner, name) 61 | return (random.randint(1, 1000), random.randint(1, 300)) 62 | else: 63 | try: 64 | req = urllib2.Request('https://api.github.com/repos/{0}/{1}'.format(owner, name)) 65 | if user is not None and token is not None: 66 | b64 = base64.encodestring('{0}:{1}'.format(user, token)).replace('\n', '') 67 | req.add_header("Authorization", "Basic {0}".format(b64)) 68 | u = urllib2.urlopen(req) 69 | j = json.load(u) 70 | t = datetime.datetime.strptime(j['updated_at'], "%Y-%m-%dT%H:%M:%SZ") 71 | days = max(int((now - t).days), 0) 72 | print ' {0}/{1}: ok'.format(owner, name) 73 | return (int(j['stargazers_count']), days) 74 | except urllib2.HTTPError, e: 75 | print ' {0}/{1}: FAILED'.format(owner, name) 76 | return (None, None) 77 | 78 | def output_repo(outf, name, stars, days, link, rdesc): 79 | popular = stars is not None and int(stars) >= 500 80 | if stars is None and days is None: 81 | title = name 82 | else: 83 | title = '%s ★ %s ⧗ %s' % (name, stars, days) 84 | if popular: 85 | outf.write('* **[{0}]({1})** - {2}\n'.format(title, link, rdesc)) 86 | else: 87 | outf.write('* [{0}]({1}) - {2}\n'.format(title, link, rdesc)) 88 | 89 | def flush_section(outf, section, sdesc, repos): 90 | print ' ' + section.strip() 91 | outf.write(section) 92 | outf.write('\n') 93 | if sdesc: 94 | outf.write(sdesc) 95 | outf.write('\n') 96 | repos.sort(key=lambda t: t[0].lower()) 97 | for name, stars, days, link, rdesc in repos: 98 | if not full_update and stars is not None and days is not None: 99 | output_repo(outf, name, stars, days, link, rdesc) 100 | continue 101 | 102 | m = github_regex.match(link) 103 | if not m: 104 | print ' {0}: not a repo'.format(link) 105 | output_repo(outf, name, stars, days, link, rdesc) 106 | continue 107 | 108 | stars, days = query(m.group(1), m.group(2)) 109 | output_repo(outf, name, stars, days, link, rdesc) 110 | outf.write('\n') 111 | 112 | def run(): 113 | if full_update: 114 | print 'querying for all entries' 115 | else: 116 | print 'querying for new entries only' 117 | 118 | if fake: 119 | print 'running in fake mode -- no GH queries will be made' 120 | 121 | if os.path.exists('.access-token'): 122 | global user, token 123 | user, token = open('.access-token').read().strip().split(':') 124 | print 'using Personal Access Token {0}:{1}'.format(user, token) 125 | else: 126 | print 'no Personal Access Token found in .access-token' 127 | 128 | inf = open(readme_path, 'r') 129 | lines = list(inf) 130 | inf.close() 131 | print 'read {0}'.format(readme_path) 132 | 133 | started = False 134 | finished = False 135 | section = None 136 | sdesc = None 137 | repos = [] 138 | outf = open(temp_path, 'w') 139 | 140 | total_repos = 0 141 | 142 | print 'writing {0}'.format(temp_path) 143 | for line in lines: 144 | if finished: 145 | outf.write(line) 146 | elif started: 147 | if end_regex.match(line): 148 | total_repos += len(repos) 149 | flush_section(outf, section, sdesc, repos) 150 | outf.write(line) 151 | finished = True 152 | elif empty_regex.match(line): 153 | continue 154 | elif section_regex.match(line): 155 | total_repos += len(repos) 156 | flush_section(outf, section, sdesc, repos) 157 | section = line 158 | sdesc = None 159 | repos = [] 160 | else: 161 | m = repo_regex.match(line) 162 | if m: 163 | name, stars, days, link, rdesc = m.groups() 164 | repos.append((name, stars, days, link, rdesc)) 165 | elif sdesc is None: 166 | sdesc = line 167 | else: 168 | raise Exception("cannot parse {0}".format(line)) 169 | else: 170 | if section_regex.match(line): 171 | section = line 172 | started = True 173 | else: 174 | outf.write(line) 175 | outf.close() 176 | print 'wrote {0} repos to {1}'.format(total_repos, temp_path) 177 | 178 | print 'moving {0} to {1}'.format(temp_path, readme_path) 179 | shutil.move(temp_path, readme_path) 180 | 181 | if __name__ == "__main__": 182 | #global fake, full_update 183 | 184 | from optparse import OptionParser 185 | 186 | parser = OptionParser() 187 | parser.add_option("-f", "--fake", action="store_true", dest="fake", 188 | default=False, help="don't query github, use fake data") 189 | parser.add_option("-u", "--update", action="store_true", dest="update", 190 | default=False, help="update all entries to newest data") 191 | 192 | opts, _ = parser.parse_args() 193 | fake = opts.fake 194 | full_update = opts.update 195 | run() 196 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Awesome Scala GameDev [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) [![Join the chat at https://gitter.im/ScalaGameDev/incubator](https://badges.gitter.im/ScalaGameDev/incubator.svg)](https://gitter.im/ScalaGameDev/incubator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 2 | 3 | 4 | A community driven list of libraries, software, and resources useful for Scala game development. Also lists of games being written in or already completed in Scala. This is not a catalog of all the libraries, just a starting point for your explorations. That said, due to the incubating environment here at ScalaGameDev, we welcome projects at any stage of development, so please submit a PR if you have or know about a project to get it added to the list. The list is inspired by [awesome-scala](https://github.com/lauris/awesome-scala). Other amazingly awesome lists can be found in the [awesome-awesomeness](https://github.com/bayandin/awesome-awesomeness) list. 5 | 6 | Also awesome is [Scaladex](https://index.scala-lang.org/), the searchable, tagged, and centralized index of Scala libraries. 7 | 8 | Projects with over 500 stargazers are in bold. 9 | 10 | - [Awesome Scala GameDev](#awesome-scala-gamedev) 11 | - [Concurrency](#concurrency) 12 | - [Emulators](#emulators) 13 | - [Games](#games) 14 | - [Game Engines and Libraries](#game-engines-and-libraries) 15 | - [Game Tools](#game-tools) 16 | - [Graphical User Interfaces](#graphical-user-interfaces) 17 | - [Resources](#resources) 18 | - [Ray tracing](#ray-tracing) 19 | - [Wrappers for Engines and Libraries](#wrappers-for-engines-and-libraries) 20 | - [Contributing](#contributing) 21 | 22 | ## Concurrency 23 | 24 | * [Reactors ★ 224 ⧗ 0](https://github.com/reactors-io/reactors) - [a concurrent, distributed programming framework](http://reactors.io) based on asynchronous event streams; currently targets Scala.js and the JVM. 25 | 26 | ## Build Tools 27 | 28 | * [CBT ★ 375 ⧗ 1](https://github.com/cvogt/cbt) - `pre-release` An upcoming, flexible build tool. Game development in Scala is one area where flexibility is often needed. 29 | * [sbt-lwjgl-plugin ★ 42 ⧗ 194](https://github.com/philcali/sbt-lwjgl-plugin) - `inactive` For use with SBT, pulls in various LWJGL dependencies, including the appropriate native dependencies. Currently doesn't work with [coursier](https://github.com/coursier/coursier). Suggest using the following patched version: `addSbtPlugin("com.storm-enroute" % "sbt-lwjgl-plugin" % "3.1.6")`. 30 | * [ScalaMeter ★ 358 ⧗ 25](https://github.com/scalameter/scalameter) - Microbenchmarking and performance regression testing framework for the JVM platform: http://scalameter.github.io. 31 | 32 | ## Emulators 33 | 34 | * [scalagb ★ 13 ⧗ 125](https://github.com/dbousamra/scalagb) - `untested` A Z80 Gameboy emulator written in Scala. 35 | 36 | ## Games 37 | 38 | 39 | ### Open-Source 40 | 41 | * [BlockSmith ★ 0 ⧗ 342](https://github.com/bbarker/BlockSmith/) - `pre-release` BlockSmith is currently an experiment in the ways of MineCraft-like voxel games. 42 | * [Checkers ★ 9 ⧗ 43](https://github.com/kschuetz/checkers) - [live demo](http://kschuetz.github.io/checkers/) Checkers game rendered in web browser using SVG (about 10000 lines of Scala.js using React). Supports AI opponents. 43 | * [CodeCraft ★ 12 ⧗ 128](https://github.com/cswinter/CodeCraftGame) - [live demo](http://www.codecraftgame.org/demo) A real-time strategy game in which you write a program to command an army of virtual drones, written in Scala.js. 44 | * [doubletetris ★ 1 ⧗ 233](https://github.com/Jasper-M/doubletetris) - [live demo](http://jasper-m.github.io/doubletetris/) An interesting take on tetris. 45 | * [hexiles-web ★ 1 ⧗ 239](https://github.com/phillipjohnson/hexiles-web) - [live demo](http://phillipjohnson.github.io/hexiles-web/game.html) An HTML5 single-player puzzle game in Scala.js. 46 | * [scalajs-react-2048 ★ 25 ⧗ 113](https://github.com/fijolekProjects/scalajs-react-2048) - [live demo](https://fijolekprojects.github.io/scalajs-react-2048/) This is [2048](http://gabrielecirulli.github.io/2048/) game clone made using [scalajs-react](https://github.com/japgolly/scalajs-react) in just 350 lines of Scala and 250 lines of CSS. 47 | * **[Scalatron ★ 578 ⧗ 14](https://github.com/scalatron/scalatron)** - [Scalatron](https://scalatron.github.io/), a multi-player programming game in which coders pit bot programs (written in Scala) against each other. 48 | * [scalawarrior ★ 103 ⧗ 12](https://github.com/scalawarrior/scalawarrior) - This is a game for learning Scala which is inspired by [ruby-warrior](https://github.com/ryanb/ruby-warrior). On each floor you instruct the warrior to battle enemies, rescue captives, and reach the stairs by writing some Scala! 49 | * [stargame ★ 1 ⧗ 1450](https://github.com/tommycli/stargame) - Multiplayer browser-based space 4X RTS. 50 | * [UltraBlackBloodDeath ★ 2 ⧗ 506](https://github.com/sykophant/sykophant-game) - `untested` An open-source FPS tournament game made using Scala on top of JME3. 51 | 52 | ### Closed-Source 53 | 54 | * [Rat Trap](https://play.google.com/store/apps/details?id=com.regblanc.rattrap&hl=en) - Rat Trap is a small and addictive puzzle game, where your role is to protect your reserve of cheese by carefully positioning blocking elements to prevent the rat from reaching it and eventually trap it. 55 | * [ScalaQuest](https://www.kickstarter.com/projects/andanthor/scalaquest-a-game-to-learn-scala) - `pre-release` An online game to learn Scala. Battle Goblins and Wizards and face all kinds of challenges while learning a new programming language. Written using [Phaser.js](https://phaser.io) and the [Play Framework](https://playframework.com). 56 | * [WinSmash](https://play.google.com/store/apps/details?id=com.regblanc.winsmash&hl=en) - WinSmash is a classic arcade game that pays homage to the late Microsoft Windows XP by reminding nostalgic people of the good old days. 57 | 58 | ### Mini-games 59 | 60 | * [monadic mario](https://github.com/OlivierBlanvillain/monadic-html/blob/master/examples/src/main/scala/mhtml/examples/Mario.scala) - [live demo](https://olivierblanvillain.github.io/monadic-html/examples/#/Mario) A very simple mario "game", writtein in [monadic-html](https://github.com/OlivierBlanvillain/monadic-html). 61 | * [scala-js-games ★ 88 ⧗ 4](https://github.com/lihaoyi/scala-js-games) - [live demo](http://www.lihaoyi.com/scala-js-games/) Demo collection including Asteroids, Astrolander, Snake, Pong, Brick, and Tetris. 62 | * [scalajs-snake ★ 4 ⧗ 152](https://github.com/vmunier/scalajs-snake) - [live demo](http://vmunier.github.io/scalajs-snake/) Snake game written in Scala.js. 63 | 64 | ## Game Engines and Libraries 65 | 66 | * [RPG Boss ★ 233 ⧗ 1](https://github.com/rpgboss/rpgboss) - Multiplatform, point and click rpg game editor and engine, based on [libgdx](https://github.com/libgdx/libgdx). 67 | * [Scage ★ 155 ⧗ 65](https://github.com/dunnololda/scage) - `inactive` 2D OpenGL game engine, based on phys2d, lwjgl, and slick. 68 | * [sgine ★ 12 ⧗ 217](https://github.com/outr/sgine) - `inactive` Scala Engine for OpenGL-based Desktop, Android, and iOS game and business development; based on [libgdx](https://github.com/libgdx/libgdx). 69 | * [SGL ★ 37 ⧗ 23](https://github.com/regb/scala-game-library) - `pre-release` Scala Game Library is a library for developing cross-platform 2D video games in Scala. It provides a high-level API for building 2D games, and can deploy for Desktop, Android, and HTML5, while iOS and console platforms are on the roadmap. Makes use of [Graphics Bindings for Scala Native](#wrappers-for-engines-and-libraries) for some platforms. 70 | * [Simplex3D ★ 28 ⧗ 217](https://github.com/lexn82/simplex3d) - `inactive` The (first?) Scala 3D engine. 71 | 72 | ## Game Tools 73 | 74 | * [scalacloth ★ 1 ⧗ 1399](https://github.com/dbousamra/scalacloth) - `untested` A cloth simulation in Scala. 75 | 76 | ## Graphical User Interfaces 77 | 78 | * [ScalaFX ★ 371 ⧗ 2](https://github.com/scalafx/scalafx) - [Scala DSL](http://www.scalafx.org/) for creating Graphical User Interfaces that sits on top of JavaFX. 79 | * [youi ★ 106 ⧗ 5](https://github.com/outr/youi) - Next generation user interface and application development in Scala.js for web, mobile, and desktop. Currently has support for a 2D API; WebGL may be added later. 80 | 81 | ## Wrappers for Engines and Libraries 82 | 83 | * [Graphics Bindings for Scala Native ★ 9 ⧗ 94](https://github.com/regb/scalanative-graphics-bindings) - `pre-release` Scala Native bindings for the popular graphics programming libraries SDL2 and OpenGL. The bindings try as much as possible to reproduce the original programming interface in C. In particular, they won't hide scalanative interoperability types behind regular Scala types. 84 | * [MacroGL ★ 81 ⧗ 7](https://github.com/storm-enroute/macrogl) - `inactive` Scala macro-based frontend for OpenGL for structured and efficient graphics code. Currently targets Scala.js and the JVM. 85 | * [SME ★ 0 ⧗ 111](https://github.com/bbarker/SME) - `pre-release` Scala Monkey Engine is a thin wrapper around [JMonkeyEngine 3](http://jmonkeyengine.org), helping to provide a more idiomatic feel to JME3 where possible. Currently requires and targets [Dotty](http://dotty.epfl.ch/). 86 | 87 | ## Ray tracing 88 | 89 | * [Scala Collections RayTracer](https://github.com/scala-blitz/scala-blitz/blob/master/src/test/scala/org/scala/optimized/test/examples/RayTracer.scala) - `inactive` A small example meant to take advantage of Scala's parallel collections, complete [with a writeup](https://scala-blitz.github.io/home/documentation/examples//raytracer.html). 90 | * [ScalaRay ★ 6 ⧗ 999](https://github.com/jesperdj/scalaray) - `inactive` Educational raytracer based on pbrt, the ray tracer described in the book Physically Based Rendering - From Theory to Implementation by Matt Pharr and Greg Humphreys 91 | * [scalasimpleray ★ 7 ⧗ 768](https://github.com/dbousamra/scalasimpleray) - `inactive` This is a VERY basic raytracer, but it's quite clean, and could be used by someone to learn. 92 | * [SunBurn ★ 1 ⧗ 1353](https://github.com/hsyl20/SunBurn) - `inactive` 93 | 94 | ## Resources 95 | 96 | * [How to make a simple HTML5 Canvas game](http://www.lostdecadegames.com/how-to-make-a-simple-html5-canvas-game/) - The style is roughly that of an NES/SNES-era Zelda game. The tutorial targets JavaScript, but there is a [Scala.js port](https://github.com/vmunier/scalajs-simple-canvas-game) ([live demo](http://vmunier.github.io/scalajs-simple-canvas-game/)). An alternative [Scala.js port](https://github.com/amsterdam-scala/Sjs-Simple-HTML5-canvas-game) using various technologies. 97 | * [Scala on Android](http://scala-android.org/) - Resources that will help you get your app (game) working on Android. 98 | 99 | # Contributing 100 | 101 | Your contributions are always welcome! Please submit a pull request or create an issue to add a new Scala game, game library (in Scala or a Scala wrapper library), article on game development related to Scala. If the project is inactive, deprecated, or pre-release a tag should be added to indicate this. 102 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. --------------------------------------------------------------------------------