Skip to content

Commit 39c7c31

Browse files
committed
feat: split quickjs into a aar library
1 parent a7db204 commit 39c7c31

Some content is hidden

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

56 files changed

+124
-68
lines changed

app/build.gradle

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ plugins {
44
}
55

66
android {
7-
namespace 'com.kugou.quickjs'
7+
namespace 'com.shiqi.testquickjs'
88
compileSdk 33
99

1010
defaultConfig {
11-
applicationId "com.kugou.quickjs"
11+
applicationId "com.shiqi.testquickjs"
1212
minSdk 24
1313
targetSdk 33
1414
versionCode 1
@@ -18,20 +18,6 @@ android {
1818
vectorDrawables {
1919
useSupportLibrary true
2020
}
21-
22-
// build quickjs
23-
externalNativeBuild {
24-
cmake {
25-
targets 'quickjs-android'
26-
arguments '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON'
27-
}
28-
}
29-
}
30-
31-
externalNativeBuild {
32-
cmake {
33-
path 'CMakeLists.txt'
34-
}
3521
}
3622

3723
buildTypes {
@@ -62,9 +48,11 @@ android {
6248

6349
dependencies {
6450

65-
implementation 'androidx.core:core-ktx:1.10.1'
66-
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
67-
implementation 'androidx.activity:activity-compose:1.7.2'
51+
implementation project(':quickjs-android')
52+
53+
implementation 'androidx.core:core-ktx:1.9.0'
54+
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
55+
implementation 'androidx.activity:activity-compose:1.5.1'
6856
implementation platform('androidx.compose:compose-bom:2022.10.00')
6957
implementation 'androidx.compose.ui:ui'
7058
implementation 'androidx.compose.ui:ui-graphics'

app/src/androidTest/java/com/kugou/quickjs/ExampleInstrumentedTest.kt renamed to app/src/androidTest/java/com/shiqi/testquickjs/ExampleInstrumentedTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.kugou.quickjs
1+
package com.shiqi.testquickjs
22

33
import androidx.test.platform.app.InstrumentationRegistry
44
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
1919
fun useAppContext() {
2020
// Context of the app under test.
2121
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22-
assertEquals("com.kugou.quickjs", appContext.packageName)
22+
assertEquals("com.shiqi.testquickjs", appContext.packageName)
2323
}
2424
}

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"
7-
android:dataExtractionRules="@xml/data_extraction_rules"
8-
android:fullBackupContent="@xml/backup_rules"
96
android:icon="@mipmap/ic_launcher"
107
android:label="@string/app_name"
118
android:roundIcon="@mipmap/ic_launcher_round"
129
android:supportsRtl="true"
13-
android:theme="@style/Theme.QuickJS"
14-
tools:targetApi="31">
10+
android:theme="@style/Theme.QuickJS">
1511
<activity
1612
android:name=".MainActivity"
1713
android:exported="true"

app/src/main/java/com/kugou/quickjs/MainActivity.kt renamed to app/src/main/java/com/shiqi/testquickjs/MainActivity.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.kugou.quickjs
1+
package com.shiqi.testquickjs
22

33
import android.os.Bundle
44
import android.util.Log
@@ -11,9 +11,8 @@ import androidx.compose.material3.Text
1111
import androidx.compose.runtime.Composable
1212
import androidx.compose.ui.Modifier
1313
import androidx.compose.ui.tooling.preview.Preview
14-
import com.kugou.quickjs.ui.theme.QuickJSTheme
1514
import com.shiqi.quickjs.QuickJS
16-
15+
import com.shiqi.testquickjs.ui.theme.QuickJSTheme
1716

1817
class MainActivity : ComponentActivity() {
1918
override fun onCreate(savedInstanceState: Bundle?) {

app/src/main/java/com/kugou/quickjs/ui/theme/Color.kt renamed to app/src/main/java/com/shiqi/testquickjs/ui/theme/Color.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.kugou.quickjs.ui.theme
1+
package com.shiqi.testquickjs.ui.theme
22

33
import androidx.compose.ui.graphics.Color
44

app/src/main/java/com/kugou/quickjs/ui/theme/Theme.kt renamed to app/src/main/java/com/shiqi/testquickjs/ui/theme/Theme.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.kugou.quickjs.ui.theme
1+
package com.shiqi.testquickjs.ui.theme
22

33
import android.app.Activity
44
import android.os.Build

app/src/main/java/com/kugou/quickjs/ui/theme/Type.kt renamed to app/src/main/java/com/shiqi/testquickjs/ui/theme/Type.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.kugou.quickjs.ui.theme
1+
package com.shiqi.testquickjs.ui.theme
22

33
import androidx.compose.material3.Typography
44
import androidx.compose.ui.text.TextStyle

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">QuickJS</string>
2+
<string name="app_name">app</string>
33
</resources>

app/src/main/res/xml/backup_rules.xml

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

app/src/main/res/xml/data_extraction_rules.xml

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

0 commit comments

Comments
 (0)