mars

Sketchware Manager

 

Sketchware Manager

Coroutine-based library for managing sketchware projects, collections, etc.

Projects ðŸ“‚

The library supports Sketchware, Sketchware Pro projects 

Example:

val manager = ProjectsManager("../.sketchware")
manager.getProjects().forEach { project ->
    when(project) {
        is SketchwareProProject -> println("I am a sketchware pro project")
        is SketchwareProject -> println("I am a sketchware project")
    }
}

Also, an instance of the SketchwarePro class, for example, has its own functionality only for it:

val project = manager.getProjects()[0] as SketchwareProProject // only as example :)
println(project.getProguardRules()) // prints proguard rules in project
project.setProguardRules("..") // sets proguard rules
// and another funcs..

Managing project logic, view, etc.

The library provides the ability to manage logic, layout, resources and other project information, but this isn't stable implementation, and the public API can change at any time.

Example:

val logicManager = project.logicManager
val mainActivityEvents = logicManager.getEvents("MainActivity")
mainActivityEvents.forEach { event -> event.apply {
        println("event name: $name")
        println("event type: $type")
    }
}

More: Data tutorials .

Collections ðŸ“¦

Our library provides the ability to get/modify a list of Collections, which is not available with conventional methods due to the nature of their storage. Example:

val collectionManager = SketchwareCollections(File(__path__))
println(collectionManager.moreblocks.getCollection()) // prints all moreblocks

More: Collections tutorial.

Implementation

build.gradle:

repositories {
    maven { url 'https://sketchcode.fun/dl' }
}
dependencies {
    implementation 'io.sketchware:Sketchware-Manager:dev-2.3.0'
}

build.gradle.kts:

repositories {
    maven("https://sketchcode.fun/dl")
}
dependencies {
    implementation("io.sketchware:Sketchware-Manager:dev-2.3.0")
}

Post a Comment

0 Comments