Skip to content

Commit

Permalink
🍂 Javet v1.0.3 (#111)
Browse files Browse the repository at this point in the history
* Supported Android (arm, arm64, x86 and x86_64) ABI >= 21
* Added `addGCEpilogueCallback`, `addGCPrologueCallback`, `removeGCEpilogueCallback` and `removeGCPrologueCallback` to `V8Runtime`
* Enhanced `JavetLibLoadingListener` to take environment variables
  • Loading branch information
caoccao authored Nov 3, 2021
1 parent 35b0473 commit 7c62548
Show file tree
Hide file tree
Showing 427 changed files with 8,591 additions and 1,706 deletions.
32 changes: 12 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Javet
.. |Discord| image:: https://img.shields.io/discord/870518906115211305?label=join%20our%20Discord&style=for-the-badge
:target: https://discord.gg/R4vvKU96gw

.. |Donate| image:: https://img.shields.io/badge/Donate-Paypal-green?style=for-the-badge
:target: https://paypal.me/caoccao?locale.x=en_US
.. |Donate| image:: https://img.shields.io/badge/Donate-green?style=for-the-badge
:target: https://opencollective.com/javet

.. |Linux Build| image:: https://img.shields.io/github/workflow/status/caoccao/Javet/Linux%20Build?label=Linux%20Build&style=for-the-badge
:target: https://github.com/caoccao/Javet/actions/workflows/linux_build.yml
Expand All @@ -24,9 +24,9 @@ Javet

If you like my work, please **Star** this project. And, you may follow me `@sjtucaocao <https://twitter.com/sjtucaocao>`_, or visit http://caoccao.blogspot.com/. And the official support channel is at `discord <https://discord.gg/R4vvKU96gw>`_.

💖 If you use Mac OS (x86_64), please be aware that the Mac OS (x86_64) build will discontinue anytime because my `MacBook Air mid-2012 <https://caoccao.blogspot.com/2021/09/macbook-air-mid-2012-from-lion-to-mojave.html>`_ will be soon deprecated by new version of V8. Please `donate <https://paypal.me/caoccao?locale.x=en_US>`_ to support me purchasing a new Mac OS (x86_64) device. Or, if you have a retired Mac OS (x86_64) device and are fine with mailing it to me, that will also be great. Thank you for supporting Javet.
💖 If you use Mac OS (x86_64), please be aware that the Mac OS (x86_64) build will discontinue anytime because my `MacBook Air mid-2012 <https://caoccao.blogspot.com/2021/09/macbook-air-mid-2012-from-lion-to-mojave.html>`_ will be soon deprecated by new version of V8. Please `donate <https://opencollective.com/javet>`_ to support me purchasing a new Mac OS (x86_64) device. Or, if you have a retired Mac OS (x86_64) device and are fine with mailing it to me, that will also be great. Thank you for supporting Javet.

💖 If you use Mac OS (arm64), unfortunately there is no Mac OS (arm64) build because I don't have any Mac OS (arm64) device. Please `donate <https://paypal.me/caoccao?locale.x=en_US>`_ to support me purchasing a new Mac OS (arm64) device.
💖 If you use Mac OS (arm64), unfortunately there is no Mac OS (arm64) build because I don't have any Mac OS (arm64) device. Please `donate <https://opencollective.com/javet>`_ to support me purchasing a new Mac OS (arm64) device.

Major Features
==============
Expand Down Expand Up @@ -58,41 +58,33 @@ Maven
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</dependency>
<!-- Mac OS (x86_64 Only) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-macos</artifactId>
<version>1.0.2</version>
</dependency>
<!-- Android (arm, arm64, x86 and x86_64) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-android</artifactId>
<version>1.0.2</version>
<type>aar</type>
<version>1.0.3</version>
</dependency>
Gradle Kotlin DSL
^^^^^^^^^^^^^^^^^

.. code-block:: kotlin
implementation("com.caoccao.javet:javet:1.0.2") // Linux or Windows
implementation("com.caoccao.javet:javet-macos:1.0.2") // Mac OS (x86_64 Only)
implementation("com.caoccao.javet:javet-android:1.0.2@aar") // Android (arm, arm64, x86 and x86_64)
implementation("com.caoccao.javet:javet:1.0.3") // Linux or Windows
implementation("com.caoccao.javet:javet-macos:1.0.3") // Mac OS (x86_64 Only)
implementation("com.caoccao.javet:javet-android:1.0.3") // Android (arm, arm64, x86 and x86_64)
Gradle Groovy DSL
^^^^^^^^^^^^^^^^^

.. code-block:: groovy
implementation 'com.caoccao.javet:javet:1.0.2' // Linux or Windows
implementation 'com.caoccao.javet:javet-macos:1.0.2' // Mac OS (x86_64 Only)
implementation 'com.caoccao.javet:javet-android:1.0.2@aar' // Android (arm, arm64, x86 and x86_64)
implementation 'com.caoccao.javet:javet:1.0.3' // Linux or Windows
implementation 'com.caoccao.javet:javet-macos:1.0.3' // Mac OS (x86_64 Only)
implementation 'com.caoccao.javet:javet-android:1.0.3' // Android (arm, arm64, x86 and x86_64)
Hello Javet
-----------
Expand Down
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
.externalNativeBuild
.cxx
local.properties
javet-android/src/main/java/com/caoccao/javet
26 changes: 17 additions & 9 deletions android/javet-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
*
*/

import org.apache.tools.ant.taskdefs.condition.Os

plugins {
id("com.android.library")
}

version = "1.0.2"
version = "1.0.3"

android {
compileSdk = 30

defaultConfig {
minSdk = 26
minSdk = 21
targetSdk = 30

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -36,7 +38,6 @@ android {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
setProperty("archivesBaseName", property("archivesBaseName") as String + "-" + version)
}
}

Expand All @@ -47,26 +48,33 @@ android {

sourceSets {
getByName("main") {
java.srcDirs("${projectDir}/../../src/main/java", "src/main/java")
java.srcDirs("src/main/java")
jniLibs.srcDirs("src/main/jniLibs")
}
}
}

dependencies {
implementation("androidx.appcompat:appcompat:1.3.1")
implementation("org.threeten:threetenbp:1.5.1")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
}

tasks.register<Jar>(name = "sourceJar") {
from(android.sourceSets["main"].java.srcDirs)
classifier = "sources"
archiveClassifier.set("sources")
}

tasks.register<Jar>(name = "javadocJar") {
from(android.sourceSets["main"].java.srcDirs)
classifier = "javadoc"
}

task<Exec>("syncSourceCode") {
project.exec {
workingDir("$projectDir/../../scripts/python")
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine("cmd", "/c", "python", "patch_android_build.py")
} else {
commandLine("sh", "-c", "python3", "patch_android_build.py")
}
}
}
2 changes: 1 addition & 1 deletion android/javet-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.caoccao.javet"
android:versionCode="1"
android:versionName="1.0.2"
android:versionName="1.0.3"
>

</manifest>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7c62548

Please sign in to comment.