Skip to content

Commit

Permalink
修改自动化提交描述
Browse files Browse the repository at this point in the history
  • Loading branch information
dango2887 committed Aug 30, 2023
1 parent b6c807d commit e6b870f
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/lib_common_pubilsh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: push_lib_widget
on: [ push ]
jobs:
push_lib_widget:
uses: DangoDX/ReusableWorkflows/.github/workflows/publish_maven_central.yml@master
with:
module_path: common/
secrets: inherit
1 change: 1 addition & 0 deletions common/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
42 changes: 42 additions & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'com.vanniktech.maven.publish'
}

android {
namespace 'com.dango.dx.common'
compileSdk 33

defaultConfig {
minSdk 21
targetSdk 33

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

implementation 'androidx.core:core-ktx:1.8.0'
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'
}
Empty file added common/consumer-rules.pro
Empty file.
27 changes: 27 additions & 0 deletions common/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
GROUP=io.github.DangoDX
POM_ARTIFACT_ID=lib_common
VERSION_NAME=0.0.0

SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=true

SONATYPE_AUTOMATIC_RELEASE=true
SONATYPE_CONNECT_TIMEOUT_SECONDS=600
SONATYPE_CLOSE_TIMEOUT_SECONDS=9000

POM_NAME=UselessDango
POM_DESCRIPTION=A description of what my library does.
POM_INCEPTION_YEAR=2023
POM_URL=https://github.com/dango-dx

POM_LICENSE_NAME=The Apache Software License, Version 2.0
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENSE_DIST=repo

POM_SCM_URL=https://github.com/dango-dx
POM_SCM_CONNECTION=scm:git:git://github.com/dango-dx
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/dango-dx

POM_DEVELOPER_ID=Dango
POM_DEVELOPER_NAME= Dango
POM_DEVELOPER_URL=https://github.com/dango-dx
21 changes: 21 additions & 0 deletions common/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.dango.dx.common

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.dango.dx.common.test", appContext.packageName)
}
}
4 changes: 4 additions & 0 deletions common/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
17 changes: 17 additions & 0 deletions common/src/test/java/com/dango/dx/common/ExampleUnitTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.dango.dx.common

import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ rootProject.name = "DangoUnit"
include ':app'
include ':lib:widget'
include ':lib:kit'
include ':common'

0 comments on commit e6b870f

Please sign in to comment.