Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dist/
/test-app/build
/test-app/libs
/test-app/metadata
/test-app/.idea
.idea

local.properties
Expand Down
7 changes: 0 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
[submodule "android-metadata-generator"]
path = android-metadata-generator
url = https://github.com/NativeScript/android-metadata-generator.git
branch = master
[submodule "test-app/assets/app/shared"]
path = test-app/app/src/main/assets/app/shared
url = git@github.com:NativeScript/common-runtime-tests-app.git
[submodule "test-app/assets/app/tns_modules/shared"]
path = test-app/app/src/main/assets/app/tns_modules/shared
url = git@github.com:NativeScript/common-runtime-tests-modules.git
[submodule "android-static-binding-generator"]
path = android-static-binding-generator
url = https://github.com/NativeScript/android-static-binding-generator
1 change: 0 additions & 1 deletion android-metadata-generator
Submodule android-metadata-generator deleted from 77c377
22 changes: 22 additions & 0 deletions android-metadata-generator/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
2 changes: 2 additions & 0 deletions android-metadata-generator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/src/jars/
/src/com/
13 changes: 13 additions & 0 deletions android-metadata-generator/LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2015 Telerik AD

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2 changes: 2 additions & 0 deletions android-metadata-generator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# android-metadata-generator
Contains the source for metadata generation in android runtime
130 changes: 130 additions & 0 deletions android-metadata-generator/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
/*
* Packs metadata generator in a .tgz file in ~/dist folder
* To build .tgz
* gradlew packmg
* To build jar
* gradlew jarmg
*/
apply plugin: "java"

sourceCompatibility = 1.6
targetCompatibility = 1.6

def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')

buildscript {
repositories {
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}

sourceSets {
main {
java {
srcDir 'src/src'
}
}
main.output.classesDir = "$rootDir/dist/classes"
}

dependencies {
compile files("./src/libs/bcel-5.2.jar")
}

task makeDistDir {
def distDir = new File("$rootDir/dist")
distDir.mkdirs()
}

task cleanDist (type: Delete) {
delete "$rootDir/dist"
}

task cleanDistForJar (type: Delete) {
delete "$rootDir/dist"
}

task cleanBuildDir (type: Delete){
delete "$rootDir/build"
}

task cleanBuildDirForJar (type: Delete){
delete "$rootDir/build"
}

task cleanBin (type: Delete) {
delete "$rootDir/src/bin"
}

task copyNecessaryFiles {
doLast {
copy {
from "$rootDir/helpers"
into "$rootDir/dist/bin"
}

copy {
from "$rootDir/package.json"
into "$rootDir/dist"
}
}
}

task packMetadataGenerator (type: Exec) {
workingDir "$rootDir/dist"

if(isWinOs) {
commandLine "cmd", "/c", "npm", "pack"
}
else {
commandLine "npm", "pack"
}
}

jar {
manifest {
attributes("Manifest-Version": "1.0",
"Main-Class": "com.telerik.metadata.Generator")
}

from {

configurations.runtime.collect {
it.isDirectory() ? it : zipTree(it)
}

configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}

task copyJarToDist (type: Copy) {
from "$rootDir/build/libs/android-metadata-generator.jar"
into "$rootDir/dist"
}

makeDistDir.dependsOn(cleanDist)
cleanBin.dependsOn(makeDistDir)
compileJava.dependsOn(cleanBin)
cleanBuildDir.dependsOn(compileJava)
copyNecessaryFiles.dependsOn(cleanBuildDir)
packMetadataGenerator.dependsOn(copyNecessaryFiles)

task packmg {
dependsOn packMetadataGenerator
}

cleanDistForJar.dependsOn(jar)
copyJarToDist.dependsOn(cleanDistForJar)
cleanBuildDirForJar.dependsOn(copyJarToDist)

task jarmg {
dependsOn cleanBuildDirForJar
}


Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Tue Jan 26 13:45:26 EET 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
160 changes: 160 additions & 0 deletions android-metadata-generator/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading