mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Replaced grunt with gradle
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -6,4 +6,5 @@
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
/node_modules
|
||||
/node_modules
|
||||
/dist
|
||||
2
.idea/.name
generated
2
.idea/.name
generated
@@ -1 +1 @@
|
||||
android-widgets-app
|
||||
android-widgets
|
||||
27
.idea/misc.xml
generated
27
.idea/misc.xml
generated
@@ -1,32 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0" />
|
||||
</component>
|
||||
<component name="NullableNotNullManager">
|
||||
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
|
||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="4">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
|
||||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
|
||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myNotNulls">
|
||||
<value>
|
||||
<list size="4">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
|
||||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
12
README.md
12
README.md
@@ -3,16 +3,8 @@ Contains the source code of the `org.nativescript.widgets` library used by the N
|
||||
|
||||
## How to Build
|
||||
```
|
||||
gradle build
|
||||
gradle packFramework
|
||||
```
|
||||
|
||||
This generates widgets-debug.aar and widgets-release.aar files located in the widgets/build/outputs/aar folder.
|
||||
|
||||
## How to Make NPM Package
|
||||
Requires nodejs, npm, gradle and grunt.
|
||||
```
|
||||
npm install
|
||||
grunt
|
||||
```
|
||||
|
||||
This generates tgz files in build folder.
|
||||
And generates tgz files in dist folder.
|
||||
|
||||
@@ -20,4 +20,4 @@ allprojects {
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/NativeScript/android-widgets/issues"
|
||||
},
|
||||
"homepage": "https://github.com/NativeScript/android-widgets#readme",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-contrib-clean": "^0.6.0",
|
||||
"grunt-contrib-copy": "^0.8.0",
|
||||
"grunt-exec": "^0.4.6",
|
||||
"grunt-mkdir": "^0.1.2"
|
||||
}
|
||||
"homepage": "https://github.com/NativeScript/android-widgets#readme"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
@@ -23,3 +25,33 @@ dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
compile 'com.android.support:support-v4:+'
|
||||
}
|
||||
|
||||
task cleanDistDir (type: Delete) {
|
||||
delete "../dist/"
|
||||
}
|
||||
|
||||
task copyAar << {
|
||||
copy {
|
||||
from "../package.json"
|
||||
into "../dist"
|
||||
}
|
||||
copy {
|
||||
from "build/outputs/aar/widgets-release.aar"
|
||||
into "../dist/platforms/android/"
|
||||
}
|
||||
}
|
||||
|
||||
task packFramework (type: Exec) {
|
||||
workingDir "../dist"
|
||||
|
||||
if(isWinOs) {
|
||||
commandLine "cmd", "/c", "npm", "pack"
|
||||
}
|
||||
else {
|
||||
commandLine "npm", "pack"
|
||||
}
|
||||
}
|
||||
|
||||
assembleRelease.dependsOn(cleanDistDir)
|
||||
copyAar.dependsOn(assembleRelease)
|
||||
packFramework.dependsOn(copyAar)
|
||||
|
||||
Reference in New Issue
Block a user