Skip to content

Demonstrate interaction between B4A and Kotlin

Notifications You must be signed in to change notification settings

unic0x/b4aKotlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

b4aKotlin

Demonstrate interaction between B4A and Kotlin

Build the Kotlin Jar

kotlinc example.kt -include-runtime -d h:\master\lib\example.jar
kotlinc example.kt -include-runtime -d h:\master\project\lib\example.jar

Build the B4A Wrapper:

../SimpleLibraryCompiler.exe Library_Name h:\master\project  - Tool

Example use of Kotlin function using B4A

Sub Globals
	Dim At() As Int
	At = Array As Int(5, 7, 1, 4, 9, 2, 1, -1)
End Sub

Sub Activity_Create(FirstTime As Boolean)
	Dim kt As Kotlin
	Log(kt.randomnumber(1,10))
	Log(kt.summ(At))
End Sub
 

Advancing

Building a more advanced jar that requires third part jars can be compiled in this way

kotlinc hello.kt -cp thirdparty.jar -include-runtime -d kotlin.jar

About

Demonstrate interaction between B4A and Kotlin

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published