commit b97cdead97dd710f492aefacc995ace4d6ebe027 Author: Zhanghu Date: Sat Mar 16 13:23:52 2024 +0800 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..58c9799 --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +*.iml +.gradle +/local.properties +.idea +app/build +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties +/apks +/test.bat +/apk +/app_classtv/build +/app_sinclass/build +/app_sinclass/release +/app_sinclasspad/build +/app_sinclasspad/release +/app_sinclasspad2/build +/app_startap/build +/bjcast/build +/cccl/build +/demo_twoscreen/build +/app_sinclassclient/build +/app_classtv/release diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..6f0562a --- /dev/null +++ b/build.gradle @@ -0,0 +1,34 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + mavenCentral() + maven { url 'https://repo1.maven.org/maven2/' } + } + dependencies { + classpath 'com.android.tools.build:gradle:7.4.2' + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + maven { url 'https://jitpack.io' } + maven { url 'https://maven.aliyun.com/repository/jcenter' } // 代替 jc + google() + mavenCentral() + maven { url 'https://repo1.maven.org/maven2/' } + } + + // 提示过时的API +// gradle.projectsEvaluated { +// tasks.withType(JavaCompile) { +// options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" +// } +// } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/clear.bat b/clear.bat new file mode 100644 index 0000000..b09a1ac --- /dev/null +++ b/clear.bat @@ -0,0 +1,20 @@ +@echo off + +echo clear builds + +rd /s /q %~dp0\app_classtv\build +rd /s /q %~dp0\app_sinclass\build +rd /s /q %~dp0\app_sinclasspad\build +rd /s /q %~dp0\app_sinclasspad2\build +rd /s /q %~dp0\app_startap\build +rd /s /q %~dp0\bjcast\build +rd /s /q %~dp0\cccl\build +rd /s /q %~dp0\demo_coaface\build +rd /s /q %~dp0\demo_serial\build +rd /s /q %~dp0\demo_serviceecd\build +rd /s /q %~dp0\demo_twoscreen\build +rd /s /q %~dp0\serialport\build +rd /s /q %~dp0\serviceecd\build +rd /s /q %~dp0\signageapi\build +rd /s /q %~dp0\signageui\build +rd /s /q %~dp0\signageutil\build \ No newline at end of file diff --git a/common.gradle b/common.gradle new file mode 100644 index 0000000..833eb60 --- /dev/null +++ b/common.gradle @@ -0,0 +1,84 @@ +import java.security.MessageDigest + +// 自定义函数 +ext { + gitVersionCode = { + def cmd = 'git rev-list HEAD --count' + return cmd.execute().text.trim().toInteger() + } + + gitVersionTag = { + def cmd = 'git describe --tags' + def version = cmd.execute().text.trim() + + def pattern = "-(\\d+)-g" + def matcher = version =~ pattern + + // 若最近的 commit 没有 tag,则增加第4位 + if (matcher) { + version = version.substring(0, matcher.start()) + "." + matcher[0][1] + } + return version + } + + releaseTime = { + return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC")) + } + + genUpdateJson = { downloadUrl, releaseDir, apkFileName, defaultConfig, variant -> + // 生成 update.json 文件,用于自动更新 + def releaseTime = releaseTime() + def txtFile = new File(releaseDir, "update.json") + def changeLog = "" + def fileMd5 = "" + + // 读取 changelog,并提取最新版本的日志 + def changeLogFile = new File(project.getProjectDir().path, "changelog.md") + def text = changeLogFile.text + def marker = "### 更新记录" + def startIndex = text.indexOf(marker) + + if (startIndex != -1) { + // 找到标记后,找到下一个空行 + def endIndex = text.indexOf('\r\n\r\n', startIndex) + if(endIndex == -1) + endIndex = text.length() - 1 + + if (endIndex != -1) { + // 截取内容并存储到变量B + def content = text.substring(startIndex + marker.length(), endIndex) + changeLog = content.trim() + changeLog = changeLog.replaceAll("\r\n", "\\\\n") + } + } + + def apkFile = new File(releaseDir, apkFileName) + // 计算 md5 值 + // 使用 Java 的 MessageDigest 计算 MD5 + MessageDigest md5 = MessageDigest.getInstance("MD5") + apkFile.eachByte(4096) { bytes, bytesRead -> + md5.update(bytes, 0, bytesRead) + } + // 将 MD5 转换为十六进制字符串 + fileMd5 = md5.digest().collect { String.format("%02X", it) }.join() + + // 写入APK信息到文本文件 + txtFile.text = "{\n" + + " \"applicationId\": \"${defaultConfig.applicationId}\",\n" + + " \"variantName\": \"${variant.buildType.name}\",\n" + + " \"versionName\": \"${defaultConfig.versionName}\",\n" + + " \"versionCode\": ${defaultConfig.versionCode},\n" + + " \"releaseDate\": \"${releaseTime}\",\n" + + " \"changeLog\": \"${changeLog}\",\n" + + " \"fileMd5\": \"${fileMd5}\",\n" + + " \"downloadUrl\": \"${downloadUrl}\"\n" + + "}" + } +} + +// 自定义任务 +task customTask { + doLast { + println "This is a custom task." + } +} \ No newline at end of file diff --git a/doc/themes/blue/blue.css b/doc/themes/blue/blue.css new file mode 100644 index 0000000..32a905c --- /dev/null +++ b/doc/themes/blue/blue.css @@ -0,0 +1,320 @@ +html { + font-size: 100%; + overflow-y: scroll; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +body { + font-family: "Microsoft Yahei", Helvetica, arial, sans-serif ; + font-size: 14px; + line-height: 1.6; + padding-top: 10px; + padding-bottom: 10px; + background-color: white; + padding: 30px; + color: #516272;} + +body > *:first-child { + margin-top: 0 !important; } +body > *:last-child { + margin-bottom: 0 !important; } + +a { + color: #4183C4; } +a.absent { + color: #cc0000; } +a.anchor { + display: block; + padding-left: 30px; + margin-left: -30px; + cursor: pointer; + position: absolute; + top: 0; + left: 0; + bottom: 0; } + +h1, h2, h3, h4, h5, h6 { + margin: 20px 0 10px; + padding: 0; + font-weight: bold; + -webkit-font-smoothing: antialiased; + cursor: text; + position: relative; } + +h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA09pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoMTMuMCAyMDEyMDMwNS5tLjQxNSAyMDEyLzAzLzA1OjIxOjAwOjAwKSAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM2NjlDQjI4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM2NjlDQjM4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzY2OUNCMDg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzY2OUNCMTg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsQhXeAAAABfSURBVHjaYvz//z8DJYCRUgMYQAbAMBQIAvEqkBQWXI6sHqwHiwG70TTBxGaiWwjCTGgOUgJiF1J8wMRAIUA34B4Q76HUBelAfJYSA0CuMIEaRP8wGIkGMA54bgQIMACAmkXJi0hKJQAAAABJRU5ErkJggg==) no-repeat 10px center; + text-decoration: none; } + +h1 tt, h1 code { + font-size: inherit; } + +h2 tt, h2 code { + font-size: inherit; } + +h3 tt, h3 code { + font-size: inherit; } + +h4 tt, h4 code { + font-size: inherit; } + +h5 tt, h5 code { + font-size: inherit; } + +h6 tt, h6 code { + font-size: inherit; } + +h1 { + font-size: 28px; + color: #2B3F52; } + +h2 { + font-size: 24px; + border-bottom: 1px solid #DDE4E9; + color: #2B3F52; } + +h3 { + font-size: 18px; + color: #2B3F52; } + +h4 { + font-size: 16px; + color: #2B3F52; } + +h5 { + font-size: 14px; + color: #2B3F52; } + +h6 { + color: #2B3F52; + font-size: 14px; +} + +p, blockquote, ul, ol, dl, li, table, pre { + margin: 15px 0; + color: #516272; } + +hr { + background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0; + border: 0 none; + color: #cccccc; + height: 4px; + padding: 0; + +} + +body > h2:first-child { + margin-top: 0; + padding-top: 0; } +body > h1:first-child { + margin-top: 0; + padding-top: 0; } +body > h1:first-child + h2 { + margin-top: 0; + padding-top: 0; } +body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child { + margin-top: 0; + padding-top: 0; } + +a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 { + margin-top: 0; + padding-top: 0; } + +h1 p, h2 p, h3 p, h4 p, h5 p, h6 p { + margin-top: 0; } + +li p.first { + display: inline-block; } +li { + margin: 0; } +ul, ol { + padding-left: 30px; } + +ul :first-child, ol :first-child { + margin-top: 0; } + +dl { + padding: 0; } +dl dt { + font-size: 14px; + font-weight: bold; + font-style: italic; + padding: 0; + margin: 15px 0 5px; } +dl dt:first-child { + padding: 0; } +dl dt > :first-child { + margin-top: 0; } +dl dt > :last-child { + margin-bottom: 0; } +dl dd { + margin: 0 0 15px; + padding: 0 15px; } +dl dd > :first-child { + margin-top: 0; } +dl dd > :last-child { + margin-bottom: 0; } + +blockquote { + border-left: 4px solid #ECF0F3; + /*padding: 0 15px;*/ + padding: 15px; + background-color:#F7F9FA; + color: #2B3F52; } +blockquote > :first-child { + margin-top: 0; } +blockquote > :last-child { + margin-bottom: 0; } + +table { + padding: 0;border-collapse: collapse; } +table tr { + border-top: 1px solid #cccccc; + background-color: white; + margin: 0; + padding: 0; } +table tr:nth-child(2n) { + background-color: #f8f8f8; } +table tr th { + font-weight: bold; + border: 1px solid #cccccc; + margin: 0; + padding: 6px 13px; } +table tr td { + border: 1px solid #cccccc; + margin: 0; + padding: 6px 13px; } +table tr th :first-child, table tr td :first-child { + margin-top: 0; } +table tr th :last-child, table tr td :last-child { + margin-bottom: 0; } + +img { + max-width: 100%; } + +span.frame { + display: block; + overflow: hidden; } +span.frame > span { + border: 1px solid #dddddd; + display: block; + float: left; + overflow: hidden; + margin: 13px 0 0; + padding: 7px; + width: auto; } +span.frame span img { + display: block; + float: left; } +span.frame span span { + clear: both; + color: #333333; + display: block; + padding: 5px 0 0; } +span.align-center { + display: block; + overflow: hidden; + clear: both; } +span.align-center > span { + display: block; + overflow: hidden; + margin: 13px auto 0; + text-align: center; } +span.align-center span img { + margin: 0 auto; + text-align: center; } +span.align-right { + display: block; + overflow: hidden; + clear: both; } +span.align-right > span { + display: block; + overflow: hidden; + margin: 13px 0 0; + text-align: right; } +span.align-right span img { + margin: 0; + text-align: right; } +span.float-left { + display: block; + margin-right: 13px; + overflow: hidden; + float: left; } +span.float-left span { + margin: 13px 0 0; } +span.float-right { + display: block; + margin-left: 13px; + overflow: hidden; + float: right; } +span.float-right > span { + display: block; + overflow: hidden; + margin: 13px auto 0; + text-align: right; } + +code, tt { + margin: 0 2px; + padding: 0 5px; + white-space: nowrap; + border: 1px solid #eaeaea; + background-color: #f8f8f8; + border-radius: 3px; } + +pre code { + margin: 0; + padding: 0; + white-space: pre; + border: none; + background: transparent; } + +.highlight pre { + background-color: #f8f8f8; + border: 1px solid #cccccc; + font-size: 13px; + line-height: 19px; + overflow: auto; + padding: 6px 10px; + border-radius: 3px; } + +pre { + background-color: #f8f8f8; + border: 1px solid #cccccc; + font-size: 13px; + line-height: 19px; + overflow: auto; + padding: 6px 10px; + border-radius: 3px; } +pre code, pre tt { + background-color: transparent; + border: none; } + +sup { + font-size: 0.83em; + vertical-align: super; + line-height: 0; +} + +code { + white-space: pre-wrap; + word-break: break-all; + display: block; + +} +* { + -webkit-print-color-adjust: exact; +} +@media screen and (min-width: 914px) { + body { + width: 960px; + margin:0 auto; + } +} +@media print { + table, pre { + page-break-inside: avoid; + } + pre { + word-wrap: break-word; + } +} \ No newline at end of file diff --git a/doc/themes/pandoc.css b/doc/themes/pandoc.css new file mode 100644 index 0000000..8b9903f --- /dev/null +++ b/doc/themes/pandoc.css @@ -0,0 +1,328 @@ +/* + * I add this to html files generated with pandoc. + */ + +html { + font-size: 100%; + overflow-y: scroll; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +body { + color: #444; + font-family: Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif; + font-size: 12px; + line-height: 1.7; + padding: 1em; + margin: auto; + max-width: 42em; + background: #fefefe; +} + +a { + color: #0645ad; + text-decoration: none; +} + +a:visited { + color: #0b0080; +} + +a:hover { + color: #06e; +} + +a:active { + color: #faa700; +} + +a:focus { + outline: thin dotted; +} + +*::-moz-selection { + background: rgba(255, 255, 0, 0.3); + color: #000; +} + +*::selection { + background: rgba(255, 255, 0, 0.3); + color: #000; +} + +a::-moz-selection { + background: rgba(255, 255, 0, 0.3); + color: #0645ad; +} + +a::selection { + background: rgba(255, 255, 0, 0.3); + color: #0645ad; +} + +p { + margin: 1em 0; +} + +img { + max-width: 100%; +} + +h1, h2, h3, h4, h5, h6 { + color: #111; + line-height: 125%; + margin-top: 2em; + font-weight: normal; +} + +h4, h5, h6 { + font-weight: bold; +} + +h1 { + font-size: 2.5em; +} + +h2 { + font-size: 2em; +} + +h3 { + font-size: 1.5em; +} + +h4 { + font-size: 1.2em; +} + +h5 { + font-size: 1em; +} + +h6 { + font-size: 0.9em; +} + +blockquote { + color: #666666; + margin: 0; + padding-left: 3em; + border-left: 0.5em #EEE solid; +} + +hr { + display: block; + height: 2px; + border: 0; + border-top: 1px solid #aaa; + border-bottom: 1px solid #eee; + margin: 1em 0; + padding: 0; +} + +pre, code, kbd, samp { + color: #000; + font-family: monospace, monospace; + _font-family: 'courier new', monospace; + font-size: 0.98em; +} + +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +b, strong { + font-weight: bold; +} + +dfn { + font-style: italic; +} + +ins { + background: #ff9; + color: #000; + text-decoration: none; +} + +mark { + background: #ff0; + color: #000; + font-style: italic; + font-weight: bold; +} + +sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +ul, ol { + margin: 1em 0; + padding: 0 0 0 2em; +} + +li p:last-child { + margin-bottom: 0; +} + +ul ul, ol ol { + margin: .3em 0; +} + +dl { + margin-bottom: 1em; +} + +dt { + font-weight: bold; + margin-bottom: .8em; +} + +dd { + margin: 0 0 .8em 2em; +} + +dd:last-child { + margin-bottom: 0; +} + +img { + border: 0; + -ms-interpolation-mode: bicubic; + vertical-align: middle; +} + +figure { + display: block; + text-align: center; + margin: 1em 0; +} + +figure img { + border: none; + margin: 0 auto; +} + +figcaption { + font-size: 0.8em; + font-style: italic; + margin: 0 0 .8em; +} + +table { + margin-bottom: 2em; + border-bottom: 1px solid #ddd; + border-right: 1px solid #ddd; + border-spacing: 0; + border-collapse: collapse; +} + +table th { + padding: .2em 1em; + background-color: #eee; + border-top: 1px solid #ddd; + border-left: 1px solid #ddd; +} + +table td { + padding: .2em 1em; + border-top: 1px solid #ddd; + border-left: 1px solid #ddd; + vertical-align: top; +} + +.author { + font-size: 1.2em; + text-align: center; +} + +@media only screen and (min-width: 480px) { + body { + font-size: 14px; + } +} +@media only screen and (min-width: 768px) { + body { + font-size: 16px; + } +} +@media print { + * { + background: transparent !important; + color: black !important; + filter: none !important; + -ms-filter: none !important; + } + + body { + font-size: 12pt; + max-width: 100%; + } + + a, a:visited { + text-decoration: underline; + } + + hr { + height: 1px; + border: 0; + border-bottom: 1px solid black; + } + + a[href]:after { + content: " (" attr(href) ")"; + } + + abbr[title]:after { + content: " (" attr(title) ")"; + } + + .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { + content: ""; + } + + pre, blockquote { + border: 1px solid #999; + padding-right: 1em; + page-break-inside: avoid; + } + + tr, img { + page-break-inside: avoid; + } + + img { + max-width: 100% !important; + } + + @page :left { + margin: 15mm 20mm 15mm 10mm; +} + + @page :right { + margin: 15mm 10mm 15mm 20mm; +} + + p, h2, h3 { + orphans: 3; + widows: 3; + } + + h2, h3 { + page-break-after: avoid; + } +} diff --git a/fullshow/.gitignore b/fullshow/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/fullshow/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/fullshow/build.gradle b/fullshow/build.gradle new file mode 100644 index 0000000..290953f --- /dev/null +++ b/fullshow/build.gradle @@ -0,0 +1,54 @@ +plugins { + id 'com.android.application' +} + +android { + namespace 'cn.ykbox.fullshow' + compileSdk 33 + buildToolsVersion "30.0.3" + + defaultConfig { + applicationId "cn.ykbox.fullshow" + minSdk 21 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + buildFeatures { + viewBinding true + } +} + +repositories { + maven { url "https://s01.oss.sonatype.org/content/groups/public" } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.9.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + + implementation project(':signageapi') + implementation project(':signageutil') + implementation 'com.blankj:utilcodex:1.31.1' + + implementation 'io.github.youth5201314:banner:2.2.2' + implementation 'com.github.bumptech.glide:glide:4.13.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0' +} \ No newline at end of file diff --git a/fullshow/proguard-rules.pro b/fullshow/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/fullshow/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/fullshow/src/androidTest/java/cn/ykbox/fullshow/ExampleInstrumentedTest.java b/fullshow/src/androidTest/java/cn/ykbox/fullshow/ExampleInstrumentedTest.java new file mode 100644 index 0000000..76e86fa --- /dev/null +++ b/fullshow/src/androidTest/java/cn/ykbox/fullshow/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package cn.ykbox.fullshow; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("cn.ykbox.fullshow", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/fullshow/src/main/AndroidManifest.xml b/fullshow/src/main/AndroidManifest.xml new file mode 100644 index 0000000..2c76375 --- /dev/null +++ b/fullshow/src/main/AndroidManifest.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fullshow/src/main/java/cn/ykbox/fullshow/BaseActivity.java b/fullshow/src/main/java/cn/ykbox/fullshow/BaseActivity.java new file mode 100644 index 0000000..170ceed --- /dev/null +++ b/fullshow/src/main/java/cn/ykbox/fullshow/BaseActivity.java @@ -0,0 +1,88 @@ +package cn.ykbox.fullshow; + +import android.os.Build; +import android.os.Bundle; +import android.util.Log; +import android.view.View; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; + +import cn.slackz.signageapi.PlatformFactory; + +public class BaseActivity extends AppCompatActivity { + final private String TAG = "BaseActivity"; + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + hideSystemUI(); + } + + @Override + protected void onResume() { + super.onResume(); + + Log.d(TAG, "onResume " + this); + PlatformFactory.getInstance().hideNavBar(true); + PlatformFactory.getInstance().setSlideShowNavBar(false); + PlatformFactory.getInstance().setSlideShowNotificationBar(false); + hideSystemUI(); + } + + @Override + protected void onPause() { + super.onPause(); + + showSystemUI(); + Log.d(TAG, "onPause " + this); + PlatformFactory.getInstance().hideNavBar(false); + PlatformFactory.getInstance().setSlideShowNotificationBar(true); + } + + @Override + public void onWindowFocusChanged(boolean hasFocus) { + super.onWindowFocusChanged(hasFocus); + // if (hasFocus) { + hideSystemUI(); + // } + } + + protected void hideSystemUI() { + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.hide(); + } + + // Enables regular immersive mode. + // For "lean back" mode, remove SYSTEM_UI_FLAG_IMMERSIVE. + // Or for "sticky immersive," replace it with SYSTEM_UI_FLAG_IMMERSIVE_STICKY + View decorView = getWindow().getDecorView(); + + decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); + + if (Build.VERSION.SDK_INT > 11 && Build.VERSION.SDK_INT < 19) { + decorView.setSystemUiVisibility(View.GONE); + } else if (Build.VERSION.SDK_INT >= 19) { + decorView.setSystemUiVisibility( + View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY + // Set the content to appear under the system bars so that the + // content doesn't resize when the system bars hide and show. + | View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + // Hide the nav bar and status bar + | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN); + } + } + // Shows the system bars by removing all the flags + // except for the ones that make the content appear under the system bars. + private void showSystemUI() { + View decorView = getWindow().getDecorView(); + decorView.setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); + } +} diff --git a/fullshow/src/main/java/cn/ykbox/fullshow/DataBean.java b/fullshow/src/main/java/cn/ykbox/fullshow/DataBean.java new file mode 100644 index 0000000..8b80c94 --- /dev/null +++ b/fullshow/src/main/java/cn/ykbox/fullshow/DataBean.java @@ -0,0 +1,36 @@ +package cn.ykbox.fullshow; + +import android.content.Context; + +import java.util.ArrayList; +import java.util.List; + +public class DataBean { + public Integer imageRes; + public String imageUrl; + public String title; + public int viewType; + + public DataBean(Integer imageRes, String title, int viewType) { + this.imageRes = imageRes; + this.title = title; + this.viewType = viewType; + } + + public DataBean(String imageUrl, String title, int viewType) { + this.imageUrl = imageUrl; + this.title = title; + this.viewType = viewType; + } + + public static List getTestData() { + List list = new ArrayList<>(); + list.add(new DataBean(R.drawable.image1, "第3代无线智能中控", 1)); + list.add(new DataBean(R.drawable.image2, "智慧班牌", 3)); + list.add(new DataBean(R.drawable.image3, "无线话筒", 3)); + list.add(new DataBean(R.drawable.image4, "可移动式智能讲桌", 1)); + list.add(new DataBean(R.drawable.image5, "TD2+智慧屏集成讲桌", 1)); + list.add(new DataBean(R.drawable.image6, "TD5+智慧屏集成讲台", 3)); + return list; + } +} diff --git a/fullshow/src/main/java/cn/ykbox/fullshow/FullscreenActivity.java b/fullshow/src/main/java/cn/ykbox/fullshow/FullscreenActivity.java new file mode 100644 index 0000000..8356d53 --- /dev/null +++ b/fullshow/src/main/java/cn/ykbox/fullshow/FullscreenActivity.java @@ -0,0 +1,90 @@ +package cn.ykbox.fullshow; + +import android.annotation.SuppressLint; + +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.FragmentManager; + +import android.content.Context; +import android.os.Build; +import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; +import android.os.SystemClock; +import android.util.Log; +import android.view.MotionEvent; +import android.view.View; +import android.view.WindowInsets; +import android.widget.Toast; + +import com.blankj.utilcode.util.ScreenUtils; +import com.bumptech.glide.Glide; +import com.bumptech.glide.load.resource.bitmap.RoundedCorners; +import com.bumptech.glide.request.RequestOptions; +import com.youth.banner.adapter.BannerImageAdapter; +import com.youth.banner.holder.BannerImageHolder; +import com.youth.banner.indicator.CircleIndicator; + +import cn.ykbox.fullshow.databinding.ActivityFullscreenBinding; +import cn.ykbox.signageutil.LongClickUtils; + +/** + * An example full-screen activity that shows and hides the system UI (i.e. + * status bar and navigation/system bar) with user interaction. + */ +public class FullscreenActivity extends BaseActivity { + + private ActivityFullscreenBinding binding; + private Context mContext; + + private Handler mHandler = new Handler(); + + private final static int CON_COUNTS = 6;// 连续点击次数 + private final static long CON_DURATION = 1500;// 连续点击最小间隔时间 + private static long[] CON_Hits = new long[CON_COUNTS]; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mContext = this; + + binding = ActivityFullscreenBinding.inflate(getLayoutInflater()); + setContentView(binding.getRoot()); + + binding.banner.setAdapter(new BannerImageAdapter(DataBean.getTestData()) { + @Override + public void onBindView(BannerImageHolder holder, DataBean data, int position, int size) { + + Log.d("fullshow", "load" + data.imageRes); + Glide.with(holder.itemView) + .load(data.imageRes) + .into(holder.imageView); + } + }) + .addBannerLifecycleObserver(this)//添加生命周期观察者 + .setIndicator(new CircleIndicator(this)) + .setLoopTime(5000); + } + + @Override + public boolean dispatchTouchEvent(MotionEvent ev) { + int h = ScreenUtils.getScreenHeight(); + + if(ev.getActionMasked() == MotionEvent.ACTION_DOWN && ev.getX() < 100 && ev.getY() > h-100) + finishByHits(); + return super.dispatchTouchEvent(ev); + } + + public void finishByHits() { + //每次点击时,数组向前移动一位 + System.arraycopy(CON_Hits, 1, CON_Hits, 0, CON_Hits.length - 1); + //为数组最后一位赋值 + CON_Hits[CON_Hits.length - 1] = SystemClock.uptimeMillis(); + if (CON_Hits[0] >= (SystemClock.uptimeMillis() - CON_DURATION)) { + CON_Hits = new long[CON_COUNTS];//重新初始化数组 + + finish(); + } + } +} \ No newline at end of file diff --git a/fullshow/src/main/res/drawable-v24/ic_launcher_foreground.xml b/fullshow/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/fullshow/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/fullshow/src/main/res/drawable/ic_launcher_background.xml b/fullshow/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/fullshow/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fullshow/src/main/res/drawable/image1.jpg b/fullshow/src/main/res/drawable/image1.jpg new file mode 100644 index 0000000..53e92ac Binary files /dev/null and b/fullshow/src/main/res/drawable/image1.jpg differ diff --git a/fullshow/src/main/res/drawable/image2.jpg b/fullshow/src/main/res/drawable/image2.jpg new file mode 100644 index 0000000..d0d0d8c Binary files /dev/null and b/fullshow/src/main/res/drawable/image2.jpg differ diff --git a/fullshow/src/main/res/drawable/image3.jpg b/fullshow/src/main/res/drawable/image3.jpg new file mode 100644 index 0000000..0ead079 Binary files /dev/null and b/fullshow/src/main/res/drawable/image3.jpg differ diff --git a/fullshow/src/main/res/drawable/image4.jpg b/fullshow/src/main/res/drawable/image4.jpg new file mode 100644 index 0000000..c322649 Binary files /dev/null and b/fullshow/src/main/res/drawable/image4.jpg differ diff --git a/fullshow/src/main/res/drawable/image5.jpg b/fullshow/src/main/res/drawable/image5.jpg new file mode 100644 index 0000000..824a794 Binary files /dev/null and b/fullshow/src/main/res/drawable/image5.jpg differ diff --git a/fullshow/src/main/res/drawable/image6.jpg b/fullshow/src/main/res/drawable/image6.jpg new file mode 100644 index 0000000..536af41 Binary files /dev/null and b/fullshow/src/main/res/drawable/image6.jpg differ diff --git a/fullshow/src/main/res/layout/activity_fullscreen.xml b/fullshow/src/main/res/layout/activity_fullscreen.xml new file mode 100644 index 0000000..67c8bc2 --- /dev/null +++ b/fullshow/src/main/res/layout/activity_fullscreen.xml @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/fullshow/src/main/res/mipmap-anydpi-v26/bg.jpg b/fullshow/src/main/res/mipmap-anydpi-v26/bg.jpg new file mode 100644 index 0000000..e98cebd Binary files /dev/null and b/fullshow/src/main/res/mipmap-anydpi-v26/bg.jpg differ diff --git a/fullshow/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/fullshow/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/fullshow/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/fullshow/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/fullshow/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/fullshow/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/fullshow/src/main/res/mipmap-hdpi/ic_launcher.webp b/fullshow/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/fullshow/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/fullshow/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/fullshow/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/fullshow/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/fullshow/src/main/res/mipmap-mdpi/ic_launcher.webp b/fullshow/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/fullshow/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/fullshow/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/fullshow/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/fullshow/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/fullshow/src/main/res/mipmap-nodpi/bg.jpg b/fullshow/src/main/res/mipmap-nodpi/bg.jpg new file mode 100644 index 0000000..e98cebd Binary files /dev/null and b/fullshow/src/main/res/mipmap-nodpi/bg.jpg differ diff --git a/fullshow/src/main/res/mipmap-xhdpi/ic_launcher.webp b/fullshow/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/fullshow/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/fullshow/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/fullshow/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/fullshow/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/fullshow/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/fullshow/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/fullshow/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/fullshow/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/fullshow/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/fullshow/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/fullshow/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/fullshow/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/fullshow/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/fullshow/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/fullshow/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/fullshow/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/fullshow/src/main/res/values-night/themes.xml b/fullshow/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..72734c0 --- /dev/null +++ b/fullshow/src/main/res/values-night/themes.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/fullshow/src/main/res/values/attrs.xml b/fullshow/src/main/res/values/attrs.xml new file mode 100644 index 0000000..e52391d --- /dev/null +++ b/fullshow/src/main/res/values/attrs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/fullshow/src/main/res/values/colors.xml b/fullshow/src/main/res/values/colors.xml new file mode 100644 index 0000000..426ac4e --- /dev/null +++ b/fullshow/src/main/res/values/colors.xml @@ -0,0 +1,15 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #FF039BE5 + #FF01579B + #FF40C4FF + #FF00B0FF + #66000000 + \ No newline at end of file diff --git a/fullshow/src/main/res/values/strings.xml b/fullshow/src/main/res/values/strings.xml new file mode 100644 index 0000000..569164e --- /dev/null +++ b/fullshow/src/main/res/values/strings.xml @@ -0,0 +1,5 @@ + + fullshow + Dummy Button + DUMMY\nCONTENT + \ No newline at end of file diff --git a/fullshow/src/main/res/values/styles.xml b/fullshow/src/main/res/values/styles.xml new file mode 100644 index 0000000..4165b10 --- /dev/null +++ b/fullshow/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/fullshow/src/main/res/values/themes.xml b/fullshow/src/main/res/values/themes.xml new file mode 100644 index 0000000..c957fa3 --- /dev/null +++ b/fullshow/src/main/res/values/themes.xml @@ -0,0 +1,27 @@ + + + + + + + + \ No newline at end of file diff --git a/fullshow/src/test/java/cn/ykbox/fullshow/ExampleUnitTest.java b/fullshow/src/test/java/cn/ykbox/fullshow/ExampleUnitTest.java new file mode 100644 index 0000000..38f3f96 --- /dev/null +++ b/fullshow/src/test/java/cn/ykbox/fullshow/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package cn.ykbox.fullshow; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..193a5b2 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,22 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..f6b961f Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..33536b0 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Aug 31 19:52:02 CST 2023 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..e69de29 diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..f955316 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/key.jks b/key.jks new file mode 100644 index 0000000..1ee9fa5 Binary files /dev/null and b/key.jks differ diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..185afcc --- /dev/null +++ b/readme.md @@ -0,0 +1,3 @@ + +## 说明 + * 这是一个临时项目,功能很简单,全屏轮播几张图片 diff --git a/release1.bat b/release1.bat new file mode 100644 index 0000000..f4dbf49 --- /dev/null +++ b/release1.bat @@ -0,0 +1,27 @@ +@echo off + + +set firstParam=%1 + +if "%firstParam%"=="" ( + set /p module=Please input module name, "all" for building all modules: + + if "%module%"=="all" ( + echo BUILD ALL MODULES + gradlew clean assembleRelease + ) else ( + echo BUILD MODULES: %module% + gradlew clean :%module%:assembleRelease + ) +) else if "%firstParam%"=="all" ( + echo BUILD MODULES: %firstParam% + gradlew clean assembleRelease +) else ( + echo BUILD MODULES: %firstParam% + gradlew clean :%firstParam%:assembleRelease +) + + + + + diff --git a/script/gen_updatejson.bat b/script/gen_updatejson.bat new file mode 100644 index 0000000..6a93116 --- /dev/null +++ b/script/gen_updatejson.bat @@ -0,0 +1,52 @@ +@echo off +setlocal enabledelayedexpansion + +REM 检查是否提供了足够的参数 +if "%~8"=="" ( + echo Please input enough parameters: + echo applicationId, variantName, versionCode, versionName, changeLog, fileMd5, downloadUrl, outputFile + exit /b 1 +) + +REM 设置参数值 +set applicationId=%1 +set variantName=%2 +set versionCode=%3 +set versionName=%4 +set changeLog=%5 +set fileMd5=%6 +set downloadUrl=%7 +set outputFile=%8 + + + +REM 创建 JSON 内容 +( + echo { + echo "applicationId": "%applicationId%", + echo "variantName": "%variantName%", + echo "versionCode": %versionCode%, + echo "versionName": "%versionName%", + echo "changeLog": "%changeLog%", + echo "fileMd5": "%fileMd5%", + echo "downloadUrl": "%downloadUrl%" + echo } +) > %outputFile% + +rem set jsonContent={^ +rem "applicationId": "%applicationId%",^ +rem "variantName": "%variantName%",^ +rem "versionCode": %versionCode%,^ +rem "versionName": "%versionName%",^ +rem "changeLog": "%changeLog%",^ +rem "fileMd5": "%fileMd5%",^ +rem "downloadUrl": "%downloadUrl%"^ +rem } + +REM echo %jsonContent% + +REM 将 JSON 内容写入文件 +REM echo.!jsonContent!>output.json + +echo JSON is wrote into %outputFile% +exit /b 0 \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..be789a7 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,24 @@ +include ':app_classtv' +include ':app_sinclass' +include ':app_sinclassclient' +include ':app_sinclasspad' +include ':app_sinclasspad2' +include ':app_startap' +include ':bjcast' +include ':cccl' +include ':signageapi' +include ':signageui' +include ':signageui_test' +include ':signageutil' +include ':serialport' +include ':serviceecd' +include ':demo_coaface' +include ':demo_ysapi' +include ':demo_serial' +include ':demo_serviceecd' +include ':demo_twoscreen' +include ':fullshow' +include ':demo_cccl' +include ':app_launcher' +include ':updater' +include ':app_sinclasspad3' diff --git a/sinclass.jks b/sinclass.jks new file mode 100644 index 0000000..5ce79e9 Binary files /dev/null and b/sinclass.jks differ