Doric command line tool refact to typescript
This commit is contained in:
50
doric-cli/assets/android/app/build.gradle
Normal file
50
doric-cli/assets/android/app/build.gradle
Normal file
@@ -0,0 +1,50 @@
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
def model = new JsonSlurper().parse(new File(project.rootDir.getParent() + File.separator + "package.json"))
|
||||
def doricSDKVersion = model.dependencies.doric.replace("^", "")
|
||||
|
||||
println("Doric Version:" + doricSDKVersion)
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.2"
|
||||
defaultConfig {
|
||||
applicationId "pub.doric.example"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
assets.srcDirs = [project.getRootDir().getParent() + "/bundle"]
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation "pub.doric:core:$doricSDKVersion"
|
||||
debugImplementation "pub.doric:devkit:$doricSDKVersion"
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
buildJSBundle.exec()
|
||||
}
|
||||
|
||||
task buildJSBundle(type: Exec) {
|
||||
workingDir project.rootDir.getParent()
|
||||
commandLine 'doric', 'build'
|
||||
}
|
Reference in New Issue
Block a user