File tree Expand file tree Collapse file tree 4 files changed +28
-3
lines changed
demos/android/demos-kotlin
java/com/antgroup/antv/f2/kotlinsamples Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -64,4 +64,18 @@ android {
6464
6565dependencies {
6666 compileOnly rootProject. extensions. dependencies. fastjson
67+ }
68+
69+ publishing {
70+ publications {
71+ release(MavenPublication ) {
72+ groupId = ' com.github.antvis'
73+ artifactId = ' F2Native'
74+ version = ' 2.1.18'
75+
76+ afterEvaluate {
77+ artifact bundleReleaseAar
78+ }
79+ }
80+ }
6781}
Original file line number Diff line number Diff line change @@ -5,14 +5,12 @@ plugins {
55
66android {
77 compileSdk rootProject.extensions.sdks.CompileSDK
8- ndkVersion rootProject. extensions. sdks. ndkVersion
98 defaultConfig {
109 namespace " com.antgroup.antv.f2.kotlinsamples"
1110 minSdkVersion rootProject.extensions.sdks.MinSDK
1211 targetSdkVersion rootProject.extensions.sdks.TargetSDK
1312 versionCode 1
1413 versionName " 1.0"
15- multiDexEnabled false
1614 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
1715 }
1816 buildTypes {
@@ -21,6 +19,15 @@ android {
2119 proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
2220 }
2321 }
22+
23+ compileOptions {
24+ sourceCompatibility JavaVersion . VERSION_1_8
25+ targetCompatibility JavaVersion . VERSION_1_8
26+ }
27+
28+ kotlinOptions {
29+ jvmTarget = " 1.8"
30+ }
2431}
2532
2633dependencies {
Original file line number Diff line number Diff line change 2626 android : label =" @string/title_activity_bridge"
2727 android : theme =" @style/AppTheme" />
2828
29- <activity android : name =" com.antgroup.antv.f2.kotlinsamples.MainActivity" >
29+ <activity android : name =" com.antgroup.antv.f2.kotlinsamples.MainActivity"
30+ android : exported =" true" >
3031 <intent-filter >
3132 <action android : name =" android.intent.action.MAIN" />
3233
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ object Utils {
1212 @JvmStatic
1313 fun loadAssetFile (context : Context , assetFile : String? ): String? {
1414 try {
15+ if (assetFile == null ){
16+ return null
17+ }
1518 val `is ` = context.assets.open(assetFile)
1619 val buf = ByteArray (1024 * 500 )
1720 val output = ByteArrayOutputStream ()
You can’t perform that action at this time.
0 commit comments