@nativescript/android 8.0.0 → 8.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/framework/app/build.gradle +47 -131
- package/framework/app/libs/runtime-libs/nativescript-optimized-with-inspector.aar +0 -0
- package/framework/app/libs/runtime-libs/nativescript-optimized.aar +0 -0
- package/framework/app/libs/runtime-libs/nativescript-regular.aar +0 -0
- package/framework/build-tools/android-metadata-generator.jar +0 -0
- package/framework/build-tools/dts-generator.jar +0 -0
- package/framework/build-tools/jsparser/js_parser.js +1 -2
- package/framework/build-tools/static-binding-generator.jar +0 -0
- package/framework/build.gradle +111 -4
- package/framework/gradle/wrapper/gradle-wrapper.properties +2 -2
- package/framework/gradle-helpers/paths.gradle +5 -3
- package/framework/gradle.properties +26 -0
- package/framework/settings.json +2 -2
- package/package.json +10 -5
|
Binary file
|
package/framework/build.gradle
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
|
2
|
+
|
|
3
|
+
import java.nio.file.Paths
|
|
4
|
+
|
|
5
|
+
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
|
6
|
+
import groovy.json.JsonSlurper
|
|
7
|
+
import static org.gradle.internal.logging.text.StyledTextOutput.Style
|
|
8
|
+
|
|
1
9
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
2
10
|
|
|
3
11
|
buildscript {
|
|
@@ -14,27 +22,126 @@ buildscript {
|
|
|
14
22
|
project.ext.set(propertyName, propertyValue)
|
|
15
23
|
}
|
|
16
24
|
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// the build script will not work with previous versions of the CLI (3.1 or earlier)
|
|
28
|
+
def dependenciesJson = file("$rootDir/dependencies.json")
|
|
29
|
+
if (!dependenciesJson.exists()) {
|
|
30
|
+
throw new BuildCancelledException("""
|
|
31
|
+
'dependencies.json' file not found. Check whether the NativeScript CLI has prepared the project beforehand,
|
|
32
|
+
and that your NativeScript version is 3.3, or a more recent one. To build an android project with the current
|
|
33
|
+
version of the {N} CLI install a previous version of the runtime package - 'tns platform add android@3.2'.
|
|
34
|
+
""")
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
project.ext.extractedDependenciesDir = "${project.buildDir}/exploded-dependencies"
|
|
38
|
+
project.ext.cleanupAllJarsTimestamp = "${project.buildDir}/cleanupAllJars.timestamp"
|
|
39
|
+
project.ext.extractAllJarsTimestamp = "${project.buildDir}/extractAllJars.timestamp"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
project.ext.nativescriptDependencies = new JsonSlurper().parseText(dependenciesJson.text)
|
|
43
|
+
project.ext.PLATFORMS_ANDROID = "platforms/android"
|
|
44
|
+
project.ext.USER_PROJECT_ROOT = "$rootDir/../.."
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
project.ext.outLogger = services.get(StyledTextOutputFactory).create("colouredOutputLogger")
|
|
49
|
+
|
|
50
|
+
project.ext.getAppPath = { ->
|
|
51
|
+
def relativePathToApp = "app"
|
|
52
|
+
def nsConfigFile = file("$USER_PROJECT_ROOT/nsconfig.json")
|
|
53
|
+
def nsConfig
|
|
54
|
+
|
|
55
|
+
if (nsConfigFile.exists()) {
|
|
56
|
+
nsConfig = new JsonSlurper().parseText(nsConfigFile.getText("UTF-8"))
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (project.hasProperty("appPath")) {
|
|
60
|
+
// when appPath is passed through -PappPath=/path/to/app
|
|
61
|
+
// the path could be relative or absolute - either case will work
|
|
62
|
+
relativePathToApp = appPath
|
|
63
|
+
} else if (nsConfig != null && nsConfig.appPath != null) {
|
|
64
|
+
relativePathToApp = nsConfig.appPath
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
project.ext.appPath = Paths.get(USER_PROJECT_ROOT).resolve(relativePathToApp).toAbsolutePath()
|
|
68
|
+
|
|
69
|
+
return project.ext.appPath
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
project.ext.getAppResourcesPath = { ->
|
|
73
|
+
def relativePathToAppResources
|
|
74
|
+
def absolutePathToAppResources
|
|
75
|
+
def nsConfigFile = file("$USER_PROJECT_ROOT/nsconfig.json")
|
|
76
|
+
def nsConfig
|
|
77
|
+
|
|
78
|
+
if (nsConfigFile.exists()) {
|
|
79
|
+
nsConfig = new JsonSlurper().parseText(nsConfigFile.getText("UTF-8"))
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (project.hasProperty("appResourcesPath")) {
|
|
83
|
+
// when appResourcesPath is passed through -PappResourcesPath=/path/to/App_Resources
|
|
84
|
+
// the path could be relative or absolute - either case will work
|
|
85
|
+
relativePathToAppResources = appResourcesPath
|
|
86
|
+
absolutePathToAppResources = Paths.get(USER_PROJECT_ROOT).resolve(relativePathToAppResources).toAbsolutePath()
|
|
87
|
+
} else if (nsConfig != null && nsConfig.appResourcesPath != null) {
|
|
88
|
+
relativePathToAppResources = nsConfig.appResourcesPath
|
|
89
|
+
absolutePathToAppResources = Paths.get(USER_PROJECT_ROOT).resolve(relativePathToAppResources).toAbsolutePath()
|
|
90
|
+
} else {
|
|
91
|
+
absolutePathToAppResources = "${getAppPath()}/App_Resources"
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
project.ext.appResourcesPath = absolutePathToAppResources
|
|
95
|
+
|
|
96
|
+
return absolutePathToAppResources
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
17
100
|
}
|
|
101
|
+
|
|
102
|
+
def applyBuildScriptConfigurations = { ->
|
|
103
|
+
def absolutePathToAppResources = getAppResourcesPath()
|
|
104
|
+
def pathToBuildScriptGradle = "$absolutePathToAppResources/Android/rootbuildscript.gradle"
|
|
105
|
+
def buildScriptGradle = file(pathToBuildScriptGradle)
|
|
106
|
+
if (buildScriptGradle.exists()) {
|
|
107
|
+
outLogger.withStyle(Style.SuccessHeader).println "\t + applying user-defined root buildscript from ${buildScriptGradle}"
|
|
108
|
+
apply from: pathToBuildScriptGradle, to: buildscript
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
nativescriptDependencies.each { dep ->
|
|
112
|
+
def pathToPluginBuildScriptGradle = "$rootDir/${dep.directory}/$PLATFORMS_ANDROID/rootbuildscript.gradle"
|
|
113
|
+
def pluginBuildScriptGradle = file(pathToPluginBuildScriptGradle)
|
|
114
|
+
if (pluginBuildScriptGradle.exists()) {
|
|
115
|
+
outLogger.withStyle(Style.SuccessHeader).println "\t + applying user-defined rootbuildscript from dependency ${pluginBuildScriptGradle}"
|
|
116
|
+
apply from: pathToPluginBuildScriptGradle, to: buildscript
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
18
121
|
initialize()
|
|
122
|
+
applyBuildScriptConfigurations()
|
|
19
123
|
|
|
20
|
-
def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "
|
|
124
|
+
def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${kotlin_version}"
|
|
21
125
|
}
|
|
126
|
+
def computeBuildToolsVersion = { -> project.hasProperty("androidBuildToolsVersion") ? androidBuildToolsVersion : "7.0.2"}
|
|
22
127
|
def kotlinVersion = computeKotlinVersion()
|
|
128
|
+
def androidBuildToolsVersion = computeBuildToolsVersion()
|
|
23
129
|
|
|
24
130
|
repositories {
|
|
25
131
|
google()
|
|
26
|
-
|
|
132
|
+
mavenCentral()
|
|
27
133
|
}
|
|
28
134
|
dependencies {
|
|
29
|
-
classpath
|
|
135
|
+
classpath "com.android.tools.build:gradle:$androidBuildToolsVersion"
|
|
30
136
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
137
|
+
classpath group: 'org.codehaus.groovy', name: 'groovy-all', version: '3.0.8', ext: 'pom'
|
|
31
138
|
}
|
|
32
139
|
}
|
|
33
140
|
|
|
34
141
|
allprojects {
|
|
35
142
|
repositories {
|
|
36
143
|
google()
|
|
37
|
-
|
|
144
|
+
mavenCentral()
|
|
38
145
|
}
|
|
39
146
|
beforeEvaluate { project ->
|
|
40
147
|
if (rootProject.hasProperty("userDefinedGradleProperties")) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Sun Jan 31 00:08:10 AST 2021
|
|
2
2
|
distributionBase=GRADLE_USER_HOME
|
|
3
3
|
distributionPath=wrapper/dists
|
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
5
5
|
zipStorePath=wrapper/dists
|
|
6
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-
|
|
6
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import groovy.json.JsonSlurper
|
|
2
2
|
|
|
3
|
+
import java.nio.file.Paths
|
|
4
|
+
|
|
3
5
|
ext.getAppPath = { userDir ->
|
|
4
6
|
def relativePathToApp = "app"
|
|
5
7
|
def nsConfigFile = file("$userDir/nsconfig.json")
|
|
@@ -17,7 +19,7 @@ ext.getAppPath = { userDir ->
|
|
|
17
19
|
relativePathToApp = nsConfig.appPath
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
return
|
|
22
|
+
return Paths.get(userDir).resolve(relativePathToApp).toAbsolutePath()
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
ext.getAppResourcesPath = { userDir ->
|
|
@@ -34,10 +36,10 @@ ext.getAppResourcesPath = { userDir ->
|
|
|
34
36
|
// when appResourcesPath is passed through -PappResourcesPath=/path/to/App_Resources
|
|
35
37
|
// the path could be relative or absolute - either case will work
|
|
36
38
|
relativePathToAppResources = ext.appResourcesPath
|
|
37
|
-
absolutePathToAppResources =
|
|
39
|
+
absolutePathToAppResources = Paths.get(userDir).resolve(relativePathToAppResources).toAbsolutePath()
|
|
38
40
|
} else if (nsConfig != null && nsConfig.appResourcesPath != null) {
|
|
39
41
|
relativePathToAppResources = nsConfig.appResourcesPath
|
|
40
|
-
absolutePathToAppResources =
|
|
42
|
+
absolutePathToAppResources = Paths.get(userDir).resolve(relativePathToAppResources).toAbsolutePath()
|
|
41
43
|
} else {
|
|
42
44
|
absolutePathToAppResources = "${getAppPath(userDir)}/App_Resources"
|
|
43
45
|
}
|
|
@@ -18,3 +18,29 @@ org.gradle.jvmargs=-Xmx16384M
|
|
|
18
18
|
|
|
19
19
|
android.enableJetifier=true
|
|
20
20
|
android.useAndroidX=true
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
BUILD_TOOLS_VERSION=31.0.0
|
|
24
|
+
COMPILE_SDK_VERSION=31
|
|
25
|
+
MIN_SDK_VERSION=19
|
|
26
|
+
ANDRIOD_BUILD_TOOLS_VERSION = 7.0.2
|
|
27
|
+
|
|
28
|
+
gson_version = 2.8.6
|
|
29
|
+
bcel_version = 6.2
|
|
30
|
+
junit_version = 4.13.2
|
|
31
|
+
mockito_core_version = 3.0.0
|
|
32
|
+
kotlin_version = 1.5.21
|
|
33
|
+
kotlinx_metadata_jvm_version = 0.3.0
|
|
34
|
+
android_x_app_compat_version = 1.3.1
|
|
35
|
+
android_x_material_version = 1.4.0
|
|
36
|
+
android_x_exif_interface_version = 1.3.2
|
|
37
|
+
android_x_view_pager_version = 1.0.0
|
|
38
|
+
android_x_fragment_version = 1.3.6
|
|
39
|
+
android_x_transition_version = 1.4.1
|
|
40
|
+
android_x_multidex_version = 2.0.1
|
|
41
|
+
commons_io_version = 2.6
|
|
42
|
+
spotbugs_version = 3.1.12
|
|
43
|
+
google_java_format_version = 1.6
|
|
44
|
+
json_version = 20180813
|
|
45
|
+
asm_util_version = 7.0
|
|
46
|
+
asm_version = 7.0
|
package/framework/settings.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript/android",
|
|
3
3
|
"description": "NativeScript Runtime for Android",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.2.0-alpha.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/NativeScript/android-runtime.git"
|
|
@@ -9,11 +9,16 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"**/*"
|
|
11
11
|
],
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
12
|
+
"versions": {
|
|
13
|
+
"v8": "9.2.230.18",
|
|
14
|
+
"gradle": "7.0.2",
|
|
15
|
+
"ndk": "r22",
|
|
16
|
+
"ndkApiLevel": "19",
|
|
17
|
+
"minSdk": "19",
|
|
18
|
+
"compileSdk": "31",
|
|
19
|
+
"buildTools": "31.0.0",
|
|
20
|
+
"kotlin": "1.5.21"
|
|
15
21
|
},
|
|
16
|
-
"android_ndk_version": "21b",
|
|
17
22
|
"publishConfig": {
|
|
18
23
|
"tag": "next",
|
|
19
24
|
"access": "public"
|