{"id":20649922,"url":"https://github.com/micartey/yawen","last_synced_at":"2025-07-31T01:17:42.264Z","repository":{"id":111901187,"uuid":"388220878","full_name":"micartey/yawen","owner":"micartey","description":"Java runtime dependency loader","archived":false,"fork":false,"pushed_at":"2024-04-24T20:13:59.000Z","size":133,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T17:16:58.746Z","etag":null,"topics":["always-up-to-date","classloader","dependency","java","runtime"],"latest_commit_sha":null,"homepage":"https://micartey.github.io/yawen/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micartey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-07-21T19:12:07.000Z","updated_at":"2024-08-14T18:37:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f9586d4-eeaa-4ebd-a61d-fde336633d58","html_url":"https://github.com/micartey/yawen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micartey%2Fyawen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micartey%2Fyawen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micartey%2Fyawen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micartey%2Fyawen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micartey","download_url":"https://codeload.github.com/micartey/yawen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234346340,"owners_count":18817716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["always-up-to-date","classloader","dependency","java","runtime"],"created_at":"2024-11-16T17:17:05.399Z","updated_at":"2025-01-17T10:20:15.606Z","avatar_url":"https://github.com/micartey.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yawen\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.oracle.com/java/\"\u003e\n    \u003cimg\n      src=\"https://img.shields.io/badge/Written%20in-java-%23EF4041?style=for-the-badge\"\n      height=\"30\"\n    /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://jitpack.io/#micartey/yawen/master-SNAPSHOT\"\u003e\n    \u003cimg\n      src=\"https://img.shields.io/badge/jitpack-master-%2321f21?style=for-the-badge\"\n      height=\"30\"\n    /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://micartey.github.io/yawen/docs\" target=\"_blank\"\u003e\n    \u003cimg\n      src=\"https://img.shields.io/badge/javadoc-reference-5272B4.svg?style=for-the-badge\"\n      height=\"30\"\n    /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n## :books: Introduction\n\nyawen loads GitHub releases into the Java runtime. With the use of yawen you can keep your application always up-to-date **without any changes** to the end user.\n\n### How does it work?\n\nyawen uses the GitHub-Api to get the releases and all of its assets.\nAn asset can be loaded through an URLClassLoader and thus contains all classes from that jar.\nOnly assets that are jar files can be loaded.\n\n## :ballot_box: Usage\n\nFirst of all, you need to create a new `YawenRepository` object by instanciating it with the GitHub user and repository name: **Username/Repository**\n\n```java\nYawenRepository repository = new YawenRepository(\"Username/Repository\");\n```\n\n### Load an Asset\n\n```java\nOptional\u003cRelease\u003e optRelease = repository.getLatestRelease();\n\noptRelease.ifPresent(release -\u003e {\n    Asset asset = Arrays.stream(release.getAssets()).filter(asset -\u003e asset.name.equals(\"dependency.jar\"))\n            .findFirst()\n            .orElseThrow(() -\u003e new RuntimeException(\"No asset found\"));\n    \n    repository.load(asset).ifPresent(classLoader -\u003e {\n        Class fromRelease = classLoader.loadClass(\"my.example.project.Class\");\n        // ...\n    });\n});\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicartey%2Fyawen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicartey%2Fyawen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicartey%2Fyawen/lists"}