Skip to content

Commit

Permalink
monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
breautek committed Oct 5, 2024
1 parent 2206201 commit 7bf3ae1
Show file tree
Hide file tree
Showing 280 changed files with 24,783 additions and 76 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/js-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

name: FuseJS

on:
push:
paths:
- 'js/**'
pull_request:
paths:
- 'js/**'

jobs:
unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
node_versions: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- run: npm ci
working-directory: js
- run: npm run build
working-directory: js
- run: npm test
working-directory: js
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "build-tools"]
path = build-tools
url = git@github.com:btfuse/build-tools.git
4 changes: 4 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
local.properties
.gradle
fuse/build
fuseTestTools/build
3 changes: 3 additions & 0 deletions android/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions android/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

329 changes: 329 additions & 0 deletions android/.idea/caches/deviceStreaming.xml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions android/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions android/.idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions android/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions android/.idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions android/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions android/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions android/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.8.8
37 changes: 37 additions & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

/*
Copyright 2023 Breautek
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.4.2" apply false
id("com.android.library") version "8.4.2" apply false
}

tasks.wrapper {
distributionType = Wrapper.DistributionType.BIN
gradleVersion = "8.7"
}

allprojects {
subprojects {
afterEvaluate {
tasks.withType(JavaCompile::class.java).configureEach {
options.compilerArgs.add("-Xlint:deprecation")
}
}
}
}
17 changes: 17 additions & 0 deletions android/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Copyright 2023-2024 Breautek

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

./gradlew :fuse:build
175 changes: 175 additions & 0 deletions android/fuse/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
import com.android.build.api.dsl.ManagedVirtualDevice

/*
Copyright 2023 Breautek
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

plugins {
id("com.android.library")
id("maven-publish")
}

android {
namespace = "com.breautek.fuse"

compileSdk = 34
buildToolsVersion = "34.0.0"

buildFeatures {
buildConfig = true
}

defaultConfig {
minSdk = 26

aarMetadata {
minCompileSdk = 26
}

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")

buildConfigField("String", "FUSE_VERSION", "\"" + file("../VERSION").readText().trim() + "\"")
}

buildTypes {
debug {
isMinifyEnabled = false
}

release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

publishing {
singleVariant("release") {
withSourcesJar()
}
}

testOptions {
targetSdk = 34

managedDevices {
devices {
register("api28", ManagedVirtualDevice::class) {
device = "Pixel 7"
apiLevel = 28
systemImageSource = "aosp"
}

register("api29", ManagedVirtualDevice::class) {
device = "Pixel 7"
apiLevel = 29
systemImageSource = "aosp"
}

register("api30", ManagedVirtualDevice::class) {
device = "Pixel 7"
apiLevel = 30
systemImageSource = "aosp-atd"
}

register("api31", ManagedVirtualDevice::class) {
device = "Pixel 7"
apiLevel = 31
systemImageSource = "aosp-atd"
}

register("api32", ManagedVirtualDevice::class) {
device = "Pixel 7"
apiLevel = 32
systemImageSource = "aosp-atd"
}

register("api33", ManagedVirtualDevice::class) {
device = "Pixel 7"
apiLevel = 33
systemImageSource = "aosp-atd"
}

register("api34", ManagedVirtualDevice::class) {
device = "Nexus One"
apiLevel = 34
systemImageSource = "aosp-atd"
}
}
}
}
}

dependencies {
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.webkit:webkit:1.12.0")
implementation("org.bouncycastle:bcprov-jdk18on:1.77")
implementation("org.bouncycastle:bcpkix-jdk18on:1.77")

testImplementation("junit:junit:4.13.2")

androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
androidTestImplementation("androidx.test:rules:1.6.1")

androidTestImplementation(project(":EchoPlugin"))
androidTestImplementation(project(":fuseTestTools"))
}

publishing {
publications {
create<MavenPublication>("release") {
groupId = "com.breautek.fuse"
artifactId = "core"
version = file("../VERSION").readText().trim()

afterEvaluate {
from(components["release"])
}
}
}

repositories {
maven {
url = uri("https://archiva.breautek.com/repository/breautek")
credentials {
username = findProperty("breautek.repository.user").toString()
password = findProperty("breautek.repository.password").toString()
}
}
}
}

android.libraryVariants.configureEach {
if (this.name.equals("release")) {
val variant = this
tasks.register<Javadoc>("generateJavadoc") {
description = "Generates a Javadoc"
source = variant.javaCompileProvider.get().source
classpath = files(variant.javaCompileProvider.get().classpath.files)

options {
encoding("UTF-8")
header = "<div style=\"display:flex;justify-content:center;height:100%;width:100%;align-items:center;\"><a href=\"/\">Main Documentation</a></div>"
}
}
}
}
Empty file added android/fuse/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions android/fuse/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Loading

0 comments on commit 7bf3ae1

Please sign in to comment.