GSoC 2019: Week 12 updates

Finally, we’re at the end! This last week of GSoC includes implementation of parts of the revised Package Manager model, namely the PackageDatabase and some methods for interacting with our Jenkins repository.


As per the revisions proposed last week, I’ve started implementing the PackageDatabase as one of the core units in this API. There are three important local files to note:

  1. $launcherDirectory/packages/sources.json
    This specifies all repositories to sync packages with. Details include its url, type and the names of packages to track. Here’s a screenshot of my current file:
  2. $launcherDirectory/packages/packages.db
    It’s a serialized HashMap of repositories to lists of tracked packages that serves as our primary data store while querying for packages.
  3. $launcherDirectory/packages/cache
    This folder will cache all the downloaded ZIP packages to support faster and offline package installation. Like all good cache storages, this too can be cleared any time to clean up disk space.

When we sync the PackageDatabase, it reads all the entries in the sources.json and tries to fetch package details from the repositories and updates a map-based datastore, which could later be serialized down to the packages.db file. Based on the repository type, it makes use of a RepositoryHandler to properly fetch the package details. It makes use of Gson for all the JSON related tasks.

RepositoryHandler and JenkinsHandler

The RepositoryHandler interface specifies one important abstract method and one static factory method:


The getPackages method should be called to fetch all package information from a given source repository, and the ofType factory method will return the appropriate RepositoryHandler implementation for any type as specified in the sources.json file.

JenkinsHandler is a RepositoryHandler that takes care of fetching package details from our Jenkins server, but can possibly interact with any Jenkins repository following a similar URL pattern. It connects using the Jenkins JSON API with a tree parameter to filter out the right details. The end product is a list of Packages that include all necessary details like its name, version and download link that could be used later.

Be sure to check out this post on my weekly GSoC forum thread.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

Up ↑

Create your website at
Get started
%d bloggers like this: