react-native-text-measure 1.0.0 → 1.0.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/android/build.gradle +34 -131
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -1,148 +1,51 @@
|
|
|
1
|
-
// android/build.gradle
|
|
2
|
-
|
|
3
|
-
// based on:
|
|
4
|
-
//
|
|
5
|
-
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
|
|
6
|
-
// previous location:
|
|
7
|
-
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
|
|
8
|
-
//
|
|
9
|
-
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
|
|
10
|
-
// previous location:
|
|
11
|
-
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
|
|
12
|
-
|
|
13
|
-
// These defaults should reflect the SDK versions used by
|
|
14
|
-
// the minimum React Native version supported.
|
|
15
|
-
def DEFAULT_COMPILE_SDK_VERSION = 28
|
|
16
|
-
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
|
|
17
|
-
def DEFAULT_MIN_SDK_VERSION = 16
|
|
18
|
-
def DEFAULT_TARGET_SDK_VERSION = 28
|
|
19
|
-
|
|
20
|
-
def safeExtGet(prop, fallback) {
|
|
21
|
-
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
apply plugin: 'com.android.library'
|
|
25
|
-
apply plugin: 'maven'
|
|
26
|
-
|
|
27
1
|
buildscript {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
|
|
32
|
-
if (project == rootProject) {
|
|
33
|
-
repositories {
|
|
34
|
-
google()
|
|
35
|
-
}
|
|
36
|
-
dependencies {
|
|
37
|
-
// This should reflect the Gradle plugin version used by
|
|
38
|
-
// the minimum React Native version supported.
|
|
39
|
-
classpath 'com.android.tools.build:gradle:3.4.1'
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
android {
|
|
45
|
-
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
|
|
46
|
-
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
|
|
47
|
-
defaultConfig {
|
|
48
|
-
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
|
|
49
|
-
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
|
|
50
|
-
versionCode 1
|
|
51
|
-
versionName "1.0"
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
52
5
|
}
|
|
53
|
-
|
|
54
|
-
|
|
6
|
+
dependencies {
|
|
7
|
+
classpath 'com.android.tools.build:gradle:7.4.2'
|
|
55
8
|
}
|
|
56
9
|
}
|
|
57
10
|
|
|
58
|
-
|
|
59
|
-
// ref: https://www.baeldung.com/maven-local-repository
|
|
60
|
-
mavenLocal()
|
|
61
|
-
maven {
|
|
62
|
-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
63
|
-
url "$rootDir/../node_modules/react-native/android"
|
|
64
|
-
}
|
|
65
|
-
maven {
|
|
66
|
-
// Android JSC is installed from npm
|
|
67
|
-
url "$rootDir/../node_modules/jsc-android/dist"
|
|
68
|
-
}
|
|
69
|
-
google()
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
dependencies {
|
|
73
|
-
//noinspection GradleDynamicVersion
|
|
74
|
-
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
def configureReactNativePom(def pom) {
|
|
78
|
-
def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)
|
|
79
|
-
|
|
80
|
-
pom.project {
|
|
81
|
-
name packageJson.title
|
|
82
|
-
artifactId packageJson.name
|
|
83
|
-
version = packageJson.version
|
|
84
|
-
group = "com.reactlibrary"
|
|
85
|
-
description packageJson.description
|
|
86
|
-
url packageJson.repository.baseUrl
|
|
87
|
-
|
|
88
|
-
licenses {
|
|
89
|
-
license {
|
|
90
|
-
name packageJson.license
|
|
91
|
-
url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename
|
|
92
|
-
distribution 'repo'
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
developers {
|
|
97
|
-
developer {
|
|
98
|
-
id packageJson.author.username
|
|
99
|
-
name packageJson.author.name
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
11
|
+
apply plugin: 'com.android.library'
|
|
104
12
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
task androidJavadoc(type: Javadoc) {
|
|
109
|
-
source = android.sourceSets.main.java.srcDirs
|
|
110
|
-
classpath += files(android.bootClasspath)
|
|
111
|
-
classpath += files(project.getConfigurations().getByName('compile').asList())
|
|
112
|
-
include '**/*.java'
|
|
113
|
-
}
|
|
13
|
+
android {
|
|
14
|
+
compileSdkVersion 33
|
|
15
|
+
buildToolsVersion "33.0.0"
|
|
114
16
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
17
|
+
defaultConfig {
|
|
18
|
+
minSdkVersion 21 // Android 5.0 — StaticLayout.Builder requires API 23, we have a pre-M fallback
|
|
19
|
+
targetSdkVersion 33
|
|
118
20
|
}
|
|
119
21
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
22
|
+
buildTypes {
|
|
23
|
+
release {
|
|
24
|
+
minifyEnabled false
|
|
25
|
+
}
|
|
124
26
|
}
|
|
125
27
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
from javaCompileTask.destinationDir
|
|
28
|
+
// Make the source set explicit so Gradle finds our java files
|
|
29
|
+
sourceSets {
|
|
30
|
+
main {
|
|
31
|
+
java.srcDirs = ['src/main/java']
|
|
32
|
+
manifest.srcFile 'src/main/AndroidManifest.xml'
|
|
132
33
|
}
|
|
133
34
|
}
|
|
134
35
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
36
|
+
compileOptions {
|
|
37
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
38
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
138
39
|
}
|
|
40
|
+
}
|
|
139
41
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
// Deploy to react-native-event-bridge/maven, ready to publish to npm
|
|
144
|
-
repository url: "file://${projectDir}/../android/maven"
|
|
145
|
-
configureReactNativePom pom
|
|
146
|
-
}
|
|
147
|
-
}
|
|
42
|
+
repositories {
|
|
43
|
+
google()
|
|
44
|
+
mavenCentral()
|
|
148
45
|
}
|
|
46
|
+
|
|
47
|
+
dependencies {
|
|
48
|
+
// React Native is provided by the host application; mark as compileOnly
|
|
49
|
+
// so we don't bundle a second copy.
|
|
50
|
+
compileOnly 'com.facebook.react:react-native:+'
|
|
51
|
+
}
|
package/package.json
CHANGED