-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
167e16a
commit 2406f47
Showing
18 changed files
with
93 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,4 @@ node_modules/ | |
package-lock.json | ||
local.properties | ||
*.bundle | ||
*.bundle.h | ||
*.d | ||
*.zip |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"prettier-config-standard" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,55 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id "com.android.application" | ||
} | ||
|
||
android { | ||
namespace 'to.holepunch.bare.android' | ||
namespace "to.holepunch.bare.android" | ||
compileSdk 34 | ||
ndkVersion '27.0.12077973' | ||
ndkVersion "27.2.12479018" | ||
|
||
defaultConfig { | ||
applicationId 'to.holepunch.bare.android' | ||
minSdk 31 | ||
applicationId "to.holepunch.bare.android" | ||
minSdk 28 | ||
targetSdk 34 | ||
versionCode 1 | ||
versionName '1.0' | ||
versionName "1.0" | ||
} | ||
|
||
externalNativeBuild { | ||
cmake { | ||
targets 'bare_android' | ||
arguments "-DCMAKE_MODULE_PATH=$System.env.CMAKE_MODULE_PATH", "-DANDROID_STL=none" | ||
} | ||
sourceSets { | ||
main { | ||
jniLibs.srcDirs "src/main/addons", "libs/bare-kit/jni" | ||
} | ||
} | ||
} | ||
|
||
buildFeatures { | ||
prefab true | ||
} | ||
task link(type: Exec) { | ||
workingDir ".." | ||
|
||
commandLine([ | ||
"npx", "bare-link", | ||
"--target", "android-arm", | ||
"--target", "android-arm64", | ||
"--target", "android-ia32", | ||
"--target", "android-x64", | ||
"--needs", "libbare-kit.so", | ||
"--out", "app/src/main/addons" | ||
]) | ||
} | ||
|
||
buildTypes { | ||
release { | ||
signingConfig signingConfigs.debug | ||
} | ||
} | ||
task pack(type: Exec) { | ||
workingDir ".." | ||
|
||
externalNativeBuild { | ||
cmake { | ||
version '3.25.0+' | ||
path '../CMakeLists.txt' | ||
} | ||
} | ||
commandLine([ | ||
"npx", "bare-pack", | ||
"--platform", "android", | ||
"--linked", | ||
"--out", "app/src/main/assets/app.bundle", | ||
"app/src/main/js/app.js" | ||
]) | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
preBuild.dependsOn link, pack | ||
|
||
implementation 'to.holepunch:bare-kit' | ||
dependencies { | ||
api fileTree(dir: "libs", include: ["bare-kit/classes.jar"]) | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1 @@ | ||
/* global Bare, BareKit */ | ||
|
||
Bare | ||
.on('suspend', () => console.log('suspended')) | ||
.on('resume', () => console.log('resumed')) | ||
.on('exit', () => console.log('exited')) | ||
|
||
const rpc = new BareKit.RPC((req) => { | ||
if (req.command === 'ping') { | ||
console.log(req.data.toString()) | ||
|
||
req.reply('Pong from Bare') | ||
} | ||
}) | ||
|
||
const req = rpc.request('ping') | ||
|
||
req.send('Ping from Bare') | ||
|
||
req.reply().then((data) => console.log(data.toString())) | ||
console.log('Hello Android!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
plugins { | ||
id 'com.android.application' version '8.4.0' apply false | ||
id "com.android.application" version "8.4.0" apply false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule bare-kit
deleted from
b63907