Skip to content

Commit 98388aa

Browse files
authored
Merge pull request #22 from kiwix/adapt_buildsystem
New build System
2 parents 215237d + c4b582c commit 98388aa

65 files changed

Lines changed: 873 additions & 321 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codecov.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
codecov:
2+
notify:
3+
require_ci_to_pass: yes
4+
5+
coverage:
6+
status:
7+
project:
8+
default:
9+
threshold: 0.1%
10+
patch:
11+
default:
12+
target: 100%
13+
threshold: 20%

.github/workflows/pull_request.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Pull requests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
10+
build_job:
11+
name: Build Pull Request
12+
runs-on: ubuntu-18.04
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Set up JDK 11
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 11
23+
24+
- name: Install dependencies
25+
run: bash ./install_deps.sh
26+
27+
- name: Compile Project
28+
run: |
29+
./gradlew generateHeaderFilesFromJavaWrapper
30+
./gradlew build
31+
32+
- name: create unit coverage
33+
run: |
34+
./gradlew createCodeCoverageReport
35+
36+
- name: Upload coverage to Codecov
37+
uses: codecov/codecov-action@v2
38+
39+
- name: Upload Coverage to GH-Actions
40+
uses: actions/upload-artifact@v2.2.0
41+
if: ${{ always() }}
42+
with:
43+
name: Tests Coverage Report
44+
path: |
45+
android-libkiwixbuild/build/coverage-report/

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build Java-LibKiwix
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- '*'
7+
- '*/**'
8+
tags:
9+
- '*'
10+
- '*/**'
11+
12+
jobs:
13+
publish:
14+
15+
runs-on: ubuntu-18.04
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 1
21+
22+
- name: Set up JDK 11
23+
uses: actions/setup-java@v2
24+
with:
25+
distribution: adopt
26+
java-version: 11
27+
28+
- name: Install dependencies
29+
run: bash ./install_deps.sh
30+
31+
- name: Compile Project
32+
run: |
33+
./gradlew generateHeaderFilesFromJavaWrapper
34+
./gradlew build
35+
36+
- name: Release build
37+
run: |
38+
./gradlew assemble
39+
40+
- name: Genrate Source jar
41+
run: |
42+
./gradlew androidSourcesJar
43+
44+
- name: Publish to MavenCentral
45+
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
46+
env:
47+
ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
48+
ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
49+
signing.keyId: ${{ secrets.SIGNING_KEY_ID }}
50+
siging.password: ${{ secrets.SIGNING_PASSWORD }}
51+
siging.key: ${{ secrets.SIGNING_KEY }}
52+
sonatypeStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.gradle
2+
local.properties
3+
build

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
1-
# Libkiwix binding for Java/Kotlin
2-
31
[![Maven Central](https://img.shields.io/maven-central/v/org.kiwix.kiwixlib/kiwixlib)](https://search.maven.org/artifact/org.kiwix.kiwixlib/kiwixlib)
42
[![CodeFactor](https://www.codefactor.io/repository/github/kiwix/java-libkiwix/badge)](https://www.codefactor.io/repository/github/kiwix/java-libkiwix)
53
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
4+
5+
# Java Libkiwix binding for Java/Kotlin
6+
7+
Android Library for accessing libkiwix and libzim in android with JAVA wrapper.
8+
9+
# Steps to build
10+
11+
## Clone java-libkiwix
12+
13+
```bash
14+
git clone https://github.com/kiwix/java-libkiwix.git
15+
cd java-libkiwix
16+
```
17+
18+
## Install dependencies
19+
20+
```bash
21+
./install_deps.sh
22+
```
23+
24+
## Compile
25+
26+
27+
```bash
28+
./gradlew generateHeaderFilesFromJavaWrapper
29+
./gradlew build
30+
```
31+
32+
AAR file will be generated in directory `lib/build/outputs/aar`
33+
34+
35+
36+

android-kiwix-lib-publisher/.gitignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

android-kiwix-lib-publisher/build.gradle

Lines changed: 0 additions & 25 deletions
This file was deleted.
-53.1 KB
Binary file not shown.

android-kiwix-lib-publisher/kiwixLibAndroid/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

android-kiwix-lib-publisher/kiwixLibAndroid/build.gradle

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)