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
42 changes: 22 additions & 20 deletions test-app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,22 @@ dependencies {
supportVer = supportVersion
}

compile "com.android.support:multidex:1.0.2"
compile "com.android.support:support-v4:$supportVer"
compile "com.android.support:appcompat-v7:$supportVer"
debugCompile "com.android.support:design:$supportVer"
implementation "com.android.support:multidex:1.0.2"
implementation "com.android.support:support-v4:$supportVer"
implementation "com.android.support:appcompat-v7:$supportVer"
debugImplementation "com.android.support:design:$supportVer"

def sbgProjectExists = !findProject(':static-binding-generator').is(null)
if (sbgProjectExists) {
provided project(':static-binding-generator')
compileOnly project(':static-binding-generator')
}
def mdgProjectExists = !findProject(':android-metadata-generator').is(null)
if (mdgProjectExists) {
provided project(':android-metadata-generator')
compileOnly project(':android-metadata-generator')
}
def dtsgProjectExists = !findProject(':dts-generator').is(null)
if (dtsgProjectExists) {
provided project(':dts-generator')
compileOnly project(':dts-generator')
}

def useV8Symbols = nativescriptDependencies.any {
Expand All @@ -224,10 +225,9 @@ dependencies {
if (!externalRuntimeExists) {
def runtime = useV8Symbols ? "nativescript-regular" : "nativescript-optimized"
println "\t + adding nativescript runtime package dependency: $runtime"
project.dependencies.add("compile", [name: runtime, ext: "aar"])
project.dependencies.add("implementation", [name: runtime, ext: "aar"])
} else {
implementation project(':runtime')

implementation project(path: ':runtime', configuration: 'default')
}
}

Expand All @@ -242,7 +242,7 @@ task addDependenciesFromNativeScriptPlugins {
def length = aarFile.name.length() - 4
def fileName = aarFile.name[0..<length]
println "\t + adding aar plugin dependency: " + aarFile.getAbsolutePath()
project.dependencies.add("compile", [name: fileName, ext: "aar"])
project.dependencies.add("implementation", [name: fileName, ext: "aar"])
}

def jarFiles = fileTree(dir: file("$rootDir/${dep.directory}/$PLATFORMS_ANDROID"), include: ["**/*.jar"])
Expand All @@ -265,7 +265,7 @@ task addDependenciesFromAppResourcesLibraries {
def length = aarFile.name.length() - 4
def fileName = aarFile.name[0..<length]
println "\t + adding aar library dependency: " + aarFile.getAbsolutePath()
project.dependencies.add("compile", [name: fileName, ext: "aar"])
project.dependencies.add("implementation", [name: fileName, ext: "aar"])
}

def jarFiles = fileTree(dir: appResourcesLibraries, include: ["**/*.jar"])
Expand All @@ -275,7 +275,7 @@ task addDependenciesFromAppResourcesLibraries {
pluginsJarLibraries.add(jarFile.getAbsolutePath())
}

project.dependencies.add("compile", jarFiles)
project.dependencies.add("implementation", jarFiles)
}
}

Expand Down Expand Up @@ -348,18 +348,20 @@ def explodeAar(File compileDependency, String outputDir) {
}

task extractAllJars {

outputs.dir extractedDependenciesDir

doLast {
def iter = configurations.compile.resolvedConfiguration.resolvedArtifacts.iterator()
def iter;
if (project.selectedBuildType == "release") {
iter = configurations.releaseCompileClasspath.resolve()
} else {
iter = configurations.debugCompileClasspath.resolve()
}
def dependencyCounter = 0
while (iter.hasNext()) {
//declaring variable as specific class for getting code completion in Android Studio
org.gradle.api.internal.artifacts.DefaultResolvedArtifact nextDependency = iter.next()

iter.each {
def nextDependency = it
def outputDir = java.nio.file.Paths.get(extractedDependenciesDir, "" + dependencyCounter).normalize().toString()
explodeAar(nextDependency.file, outputDir)
explodeAar(nextDependency, outputDir)
dependencyCounter++
}
}
Expand Down
8 changes: 4 additions & 4 deletions test-app/build-tools/android-metadata-generator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Packs metadata generator in a .tgz file in ~/dist folder
* To build .tgz
* gradlew packmg
Expand Down Expand Up @@ -42,11 +42,11 @@ task copyNecessaryFiles {
from "$rootDir/helpers"
into "$rootDir/dist/bin"
}

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

Expand All @@ -55,7 +55,7 @@ jar {
attributes("Manifest-Version": "1.0",
"Main-Class": "com.telerik.metadata.Generator")
}

from {

configurations.runtime.collect {
Expand Down
3 changes: 1 addition & 2 deletions test-app/runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ android {
compileSdkVersion 26
buildToolsVersion project.ext._buildToolsVersion

publishNonDefault true
defaultConfig {
minSdkVersion 17
targetSdkVersion 26
Expand Down Expand Up @@ -65,7 +64,7 @@ android {
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
implementation fileTree(include: ['*.jar'], dir: 'libs')
}

tasks.whenTaskAdded { task ->
Expand Down