Skip to content

Commit 9dd877a

Browse files
author
Mihail Slavchev
committed
move android-metadata-generator
1 parent 19df164 commit 9dd877a

37 files changed

Lines changed: 2057 additions & 5 deletions

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[submodule "android-metadata-generator"]
2-
path = android-metadata-generator
3-
url = https://github.com/NativeScript/android-metadata-generator.git
4-
branch = master
51
[submodule "test-app/assets/app/shared"]
62
path = test-app/app/src/main/assets/app/shared
73
url = git@github.com:NativeScript/common-runtime-tests-app.git

android-metadata-generator

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
/src/jars/
3+
/src/com/
4+
/dist
5+
.gradle

android-metadata-generator/LICENCE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2015 Telerik AD
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# android-metadata-generator
2+
Contains the source for metadata generation in android runtime
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/*
2+
* Packs metadata generator in a .tgz file in ~/dist folder
3+
* To build .tgz
4+
* gradlew packmg
5+
* To build jar
6+
* gradlew jarmg
7+
*/
8+
apply plugin: "java"
9+
10+
sourceCompatibility = 1.6
11+
targetCompatibility = 1.6
12+
13+
def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
14+
15+
buildscript {
16+
repositories {
17+
jcenter()
18+
}
19+
20+
dependencies {
21+
classpath 'com.android.tools.build:gradle:1.5.0'
22+
}
23+
}
24+
25+
sourceSets {
26+
main {
27+
java {
28+
srcDir 'src/src'
29+
}
30+
}
31+
main.output.classesDir = "$rootDir/dist/classes"
32+
}
33+
34+
dependencies {
35+
compile files("./src/libs/bcel-5.2.jar")
36+
}
37+
38+
task makeDistDir {
39+
def distDir = new File("$rootDir/dist")
40+
distDir.mkdirs()
41+
}
42+
43+
task cleanDist (type: Delete) {
44+
delete "$rootDir/dist"
45+
}
46+
47+
task cleanDistForJar (type: Delete) {
48+
delete "$rootDir/dist"
49+
}
50+
51+
task cleanBuildDir (type: Delete){
52+
delete "$rootDir/build"
53+
}
54+
55+
task cleanBuildDirForJar (type: Delete){
56+
delete "$rootDir/build"
57+
}
58+
59+
task cleanBin (type: Delete) {
60+
delete "$rootDir/src/bin"
61+
}
62+
63+
task copyNecessaryFiles {
64+
doLast {
65+
copy {
66+
from "$rootDir/helpers"
67+
into "$rootDir/dist/bin"
68+
}
69+
70+
copy {
71+
from "$rootDir/package.json"
72+
into "$rootDir/dist"
73+
}
74+
}
75+
}
76+
77+
task packMetadataGenerator (type: Exec) {
78+
workingDir "$rootDir/dist"
79+
80+
if(isWinOs) {
81+
commandLine "cmd", "/c", "npm", "pack"
82+
}
83+
else {
84+
commandLine "npm", "pack"
85+
}
86+
}
87+
88+
jar {
89+
manifest {
90+
attributes("Manifest-Version": "1.0",
91+
"Main-Class": "com.telerik.metadata.Generator")
92+
}
93+
94+
from {
95+
96+
configurations.runtime.collect {
97+
it.isDirectory() ? it : zipTree(it)
98+
}
99+
100+
configurations.compile.collect {
101+
it.isDirectory() ? it : zipTree(it)
102+
}
103+
}
104+
}
105+
106+
task copyJarToDist (type: Copy) {
107+
from "$rootDir/build/libs/android-metadata-generator.jar"
108+
into "$rootDir/dist"
109+
}
110+
111+
makeDistDir.dependsOn(cleanDist)
112+
cleanBin.dependsOn(makeDistDir)
113+
compileJava.dependsOn(cleanBin)
114+
cleanBuildDir.dependsOn(compileJava)
115+
copyNecessaryFiles.dependsOn(cleanBuildDir)
116+
packMetadataGenerator.dependsOn(copyNecessaryFiles)
117+
118+
task packmg {
119+
dependsOn packMetadataGenerator
120+
}
121+
122+
cleanDistForJar.dependsOn(jar)
123+
copyJarToDist.dependsOn(cleanDistForJar)
124+
cleanBuildDirForJar.dependsOn(copyJarToDist)
125+
126+
task jarmg {
127+
dependsOn cleanBuildDirForJar
128+
}
129+
130+
52.4 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Tue Jan 26 13:45:26 EET 2016
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

android-metadata-generator/gradlew

Lines changed: 160 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)