Skip to content

Commit

Permalink
Resolve issues #42, #43, #56, #57, #69, #70, #71
Browse files Browse the repository at this point in the history
This patches resolve the issues: #42, #43, #56, #57, #69, #70, #71 with
following changes:
-Fix build errors
-Remove update check process with the broken link in android-install.js
-Remove update check process with the broken link in ios-install.js
-Change media URLs in SamplerEventHandler.js
  • Loading branch information
seokhee-lee committed Oct 15, 2020
1 parent 829e610 commit 0c52b65
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 73 deletions.
77 changes: 65 additions & 12 deletions Connect-SDK-Android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,55 @@

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.android.tools.build:gradle:4.0.1'
}
}

allprojects {
repositories {
google()
jcenter()
}
}

apply plugin: 'com.android.library'
apply plugin: 'jacoco'


jacoco {
toolVersion = "0.8.5"
}

task jacocoTestReport(type:JacocoReport, dependsOn: "check") {
group = "Reporting"

description = "Generate Jacoco coverage reports"

getClassDirectories().setFrom(
dir: 'build/intermediates/classes/debug',
excludes: ['**/R.class',
'**/R$*.class',
'**/*$ViewInjector*.*',
'**/BuildConfig.*',
'**/Manifest*.*']
)

additionalSourceDirs.from = android.sourceSets.main.java.srcDirs
sourceDirectories.from = android.sourceSets.main.java.srcDirs
executionData.from = 'build/jacoco/testDebug.exec'

reports {
xml.enabled = true
html.enabled = true
}

}

build.dependsOn jacocoTestReport

android {
compileSdkVersion 22
Expand All @@ -26,11 +62,6 @@ android {
exclude 'META-INF/NOTICE'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
Expand All @@ -46,9 +77,17 @@ android {
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
test {
java.srcDirs = [
'core/test/src',
'modules/google_cast/test/src',
'modules/firetv/test/src',
]
}
}
buildTypes {
debug {
testCoverageEnabled = true
}
release {
minifyEnabled false
Expand All @@ -61,16 +100,30 @@ android {
}
}

android.testOptions.unitTests.all {
include '**/*Test.class'
}

dependencies {
compile files('core/libs/Java-WebSocket-1.3.7.jar')
compile files('core/libs/javax.jmdns_3.4.1-patch2.jar')

compile fileTree(dir: 'modules/firetv/libs', include: '*.jar')
api 'com.android.support:appcompat-v7:22.2.1'

implementation fileTree(dir: 'modules/firetv/libs', include: '*.jar')

implementation 'com.android.support:support-v4:22.2.1'
implementation 'com.android.support:mediarouter-v7:22.2.1'
implementation 'com.google.android.gms:play-services-cast:7.8.0'
implementation 'com.googlecode.plist:dd-plist:1.23'
implementation 'com.nimbusds:srp6a-android:2.0.2'
implementation 'net.i2p.crypto:eddsa:0.2.0'

compile 'com.android.support:support-v4:22.2.1'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:mediarouter-v7:22.2.1'
compile 'com.google.android.gms:play-services-cast:7.8.0'
testImplementation 'org.apache.maven:maven-ant-tasks:2.1.3'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'org.powermock:powermock-api-mockito:1.6.2'
testImplementation 'xmlunit:xmlunit:1.4'
}

apply from: 'maven-push.gradle'
apply from: 'maven-push.gradle'
34 changes: 3 additions & 31 deletions scripts/android-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var commands = {

var paths = {
"ConnectSDK_Repository": "https://github.com/ConnectSDK/Connect-SDK-Android.git",
"ConnectSDK_Tag": "1.6.2",
"ConnectSDK_Tag": "master",
"FlingSDK_URL": "https://s3-us-west-1.amazonaws.com/amazon-fling/AmazonFling-SDK.zip",
"AmazonFling_Jar": "./csdk_tmp/android-sdk/lib/AmazonFling.jar",
"WhisperPlay_Jar": "./csdk_tmp/android-sdk/lib/android/WhisperPlay.jar"
Expand All @@ -38,35 +38,7 @@ AndroidInstall.prototype.steps = [
AndroidInstall.prototype.start = function () {
console.log("Starting ConnectSDK Android install");
var self = this;

var deferred = Q.defer();

// Check for updated install steps
console.log("Checking for updated configuration");
http.get("http://ec2-54-201-108-205.us-west-2.compute.amazonaws.com/CordovaPlugin/1.6.0/Android/paths.json", function(res) {
var body = '';

res.on('data', function(chunk){
body += chunk;
});

res.on('end', function() {
try {
var tmp_paths = JSON.parse(body);
paths = tmp_paths;
} catch(err) {
console.log("Error parsing updates, using default configuration (install might fail)");
}
deferred.resolve();
});
}).on('error', function(e) {
console.log("Error checking for updates, using default configuration (install might fail)");
deferred.resolve();
});

deferred.promise.then(function () {
self.executeStep(0);
});
self.executeStep(0);
};

AndroidInstall.prototype.executeStep = function (step) {
Expand Down Expand Up @@ -119,7 +91,7 @@ AndroidInstall.prototype.cloneConnectSDK = function () {
}
})
.then(function () {
return Q.nfcall(exec, "git clone --depth 1 " + paths.ConnectSDK_Repository + " " + safePath("./cordova-plugin-connectsdk/" + csdkDirectory));
return Q.nfcall(exec, "git clone " + paths.ConnectSDK_Repository + " " + safePath("./cordova-plugin-connectsdk/" + csdkDirectory));
})
.then(function () {
return Q.nfcall(exec, "git checkout " + paths.ConnectSDK_Tag, {cwd: safePath("./cordova-plugin-connectsdk/" + csdkDirectory)});
Expand Down
31 changes: 1 addition & 30 deletions scripts/ios-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,37 +45,8 @@ if (!isMac) {

iOSInstall.prototype.start = function () {
console.log("Starting ConnectSDK iOS install");

var self = this;

var deferred = Q.defer();

// Check for updated install steps
console.log("Checking for updated configuration values");
http.get("http://ec2-54-201-108-205.us-west-2.compute.amazonaws.com/CordovaPlugin/1.6.0/iOS/paths.json", function(res) {
var body = '';

res.on('data', function(chunk){
body += chunk;
});

res.on('end', function() {
try {
var tmp_paths = JSON.parse(body);
paths = tmp_paths;
} catch(err) {
console.log("Error parsing updates, using default configuration (install might fail)");
}
deferred.resolve();
});
}).on('error', function(e) {
console.log("Error checking for updates, using default configuration (install might fail)");
deferred.resolve();
});

deferred.promise.then(function () {
self.executeStep(0);
});
self.executeStep(0);
};

iOSInstall.prototype.executeStep = function (step) {
Expand Down

0 comments on commit 0c52b65

Please sign in to comment.