Skip to content

Commit

Permalink
v2.1.0 릴리즈
Browse files Browse the repository at this point in the history
v2.1.0 릴리즈
  • Loading branch information
ippnsj authored Oct 10, 2023
2 parents ba3f489 + 03fe003 commit a971358
Show file tree
Hide file tree
Showing 581 changed files with 33,771 additions and 0 deletions.
167 changes: 167 additions & 0 deletions .github/workflows/backend_pr_decorator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
name: PR 코드 분석

on:
pull_request:
types: [opened, reopened, synchronize]
branches: [ main, develop, develop-be ]

permissions: write-all

jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'backend')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: settings java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: cache gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: chmod gradle
run: chmod +x backend/ddang/gradlew

- name: run jacocoTestCoverage
run: |
cd backend/ddang
./gradlew jacocoTestCoverage --info
- name: set author slack id
if: always()
id: author-slack
run: |
GIT_ID=${{ github.event.pull_request.user.login }}
if [ "$GIT_ID" == "apptie" ]; then
AUTHOR_NAME="${{ secrets.apptie_slack_display_name }}"
AUTHOR_ID="${{ secrets.apptie_slack_id }}"
elif [ "$GIT_ID" == "swonny" ]; then
AUTHOR_NAME="${{ secrets.swonny_slack_display_name }}"
AUTHOR_ID="${{ secrets.swonny_slack_id }}"
elif [ "$GIT_ID" == "jj503" ]; then
AUTHOR_NAME="${{ secrets.jj503_slack_display_name }}"
AUTHOR_ID="${{ secrets.jj503_slack_id }}"
elif [ "$GIT_ID" == "kwonyj1022" ]; then
AUTHOR_NAME="${{ secrets.kwonyj1022_slack_display_name }}"
AUTHOR_ID="${{ secrets.kwonyj1022_slack_id }}"
fi
echo "AUTHOR_NAME=${AUTHOR_NAME}" >> $GITHUB_OUTPUT
echo "AUTHOR_ID=${AUTHOR_ID}" >> $GITHUB_OUTPUT
- name: run an analysis of the ${{ github.REF }} branch ${{ github.BASE_REF }} base
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_URL }}
with:
args: >
-Dsonar.issuesReport.console.enable=true
-Dsonar.projectKey=develop-be-project
-Dsonar.java.binaries=backend/ddang/build/classes
-Dsonar.exclusions=**/*Dto*.java,**/*Application*.java,**/*Exception*.java,**/*Response*.java,**/*Request*.java,**/*Configuration*.java,**/*Appender*.java,**/*.html,**/generated/**,**/resources/**
-Dsonar.sourceEncoding=UTF-8
-Dsonar.java.coveragePlugin=jacoco
-Dsonar.coverage.jacoco.xmlReportPaths=backend/ddang/build/reports/jacoco/test/jacocoTestReport.xml
-Dsonar.issue.ignore.multicriteria=e1,e2
-Dsonar.issue.ignore.multicriteria.e1.ruleKey=java:S100
-Dsonar.issue.ignore.multicriteria.e1.resourceKey=**/*Test.java
-Dsonar.issue.ignore.multicriteria.e2.ruleKey=java:S1192
-Dsonar.issue.ignore.multicriteria.e2.resourceKey=**/*Test.java
- name: sonarqube quality check
id: sonar-quality
run: |
SONAR_PROJECT_KEY="develop-be-project"
SONAR_TOKEN="${{ secrets.SONAR_TOKEN }}"
RESULT=$(curl -s -u "admin:root" "${{ secrets.SONAR_URL }}/api/qualitygates/project_status?projectKey=${SONAR_PROJECT_KEY}&pullRequest=${{github.event.number}}")
STATUS=$(echo "$RESULT" | jq -r '.projectStatus.status')
ERROR_METRIC_KEYS=$(echo "$RESULT" | jq -r '.projectStatus.conditions[] | select(.status == "ERROR").metricKey')
echo "STATUS=${STATUS}" >> $GITHUB_OUTPUT
echo "ERROR_METRIC_KEYS=${ERROR_METRIC_KEYS}" >> $GITHUB_OUTPUT
- name: set variables
id: variables
run: |
SONAR_SCANNER_URL="${{ secrets.SONAR_URL }}/dashboard?id=sonarqube-test&pullRequest=${{github.event.number}}"
REVIEWERS_GIT_ID='${{ toJson(github.event.pull_request.requested_reviewers[*].login) }}'
reviewers=$(echo "$REVIEWERS_GIT_ID" | jq -r '.[]')
REVIEWERS_SLACK_ID=""
for reviewer in $reviewers; do
echo "Reviewer: $reviewer"
if [ "$reviewer" == "apptie" ]; then
REVIEWERS_SLACK_ID+="<@${{ secrets.apptie_slack_id }}> "
elif [ "$reviewer" == "swonny" ]; then
REVIEWERS_SLACK_ID+="<@${{ secrets.swonny_slack_id }}> "
elif [ "$reviewer" == "JJ503" ]; then
REVIEWERS_SLACK_ID+="<@${{ secrets.jj503_slack_id }}> "
elif [ "$reviewer" == "kwonyj1022" ]; then
REVIEWERS_SLACK_ID+="<@${{ secrets.kwonyj1022_slack_id }}> "
fi
done
echo "AUTHOR=${AUTHOR}" >> $GITHUB_OUTPUT
echo "SONAR_SCANNER_URL=${SONAR_SCANNER_URL}" >> $GITHUB_OUTPUT
echo "REVIEWERS=${REVIEWERS}" >> $GITHUB_OUTPUT
echo "REVIEWERS_SLACK_ID=${REVIEWERS_SLACK_ID}" >> $GITHUB_OUTPUT
- name: slack test
run: |
SLACK_MESSAGE='{"text":"PR 브랜치 분석","blocks":[{"type":"section","text":{"type":"mrkdwn","text":">*PR 브랜치 분석* \n>\n>*PR Author*\n>'
SLACK_MESSAGE+="${{ steps.author-slack.outputs.AUTHOR_NAME }}"
SLACK_MESSAGE+="\n>\n>*PR 링크*\n><"
SLACK_MESSAGE+="${{ github.event.pull_request.html_url }} "
SLACK_MESSAGE+="> \n>\n>분석 결과\n>"
SLACK_MESSAGE+=":white_check_mark:"
SLACK_MESSAGE+="\n>\n>*리뷰어*\n>"
SLACK_MESSAGE+="${{ steps.variables.outputs.REVIEWERS_SLACK_ID }}"
SLACK_MESSAGE+='"}}]}'
curl -X POST ${{ secrets.SLACK_WEBHOOK }} -d "${SLACK_MESSAGE}"
- name: slack failed test
if: failure()
run: |
SLACK_MESSAGE='{"text":"PR 브랜치 분석","blocks":[{"type":"section","text":{"type":"mrkdwn","text":">*PR 브랜치 분석* \n>\n>*PR Author*\n>'
SLACK_MESSAGE+="<@"
SLACK_MESSAGE+="${{ steps.author-slack.outputs.AUTHOR_ID }}"
SLACK_MESSAGE+=">"
SLACK_MESSAGE+="\n>\n>*PR 링크*\n><"
SLACK_MESSAGE+="${{ github.event.pull_request.html_url }} "
SLACK_MESSAGE+="> \n>\n>분석 결과\n>"
SLACK_MESSAGE+=":x:"
SLACK_MESSAGE+='"}}]}'
curl -X POST ${{ secrets.SLACK_WEBHOOK }} -d "${SLACK_MESSAGE}"
- name: slack cancelled test
if: cancelled()
run: |
SLACK_MESSAGE='{"text":"PR 브랜치 분석","blocks":[{"type":"section","text":{"type":"mrkdwn","text":">*PR 브랜치 분석* \n>\n>*PR Author*\n>'
SLACK_MESSAGE+="<@"
SLACK_MESSAGE+="${{ steps.author-slack.outputs.AUTHOR_ID }}"
SLACK_MESSAGE+=">"
SLACK_MESSAGE+="\n>\n>*PR 링크*\n><"
SLACK_MESSAGE+="${{ github.event.pull_request.html_url }} "
SLACK_MESSAGE+="> \n>\n>분석 결과\n>"
SLACK_MESSAGE+=":black_square_for_stop:"
SLACK_MESSAGE+='"}}]}'
curl -X POST ${{ secrets.SLACK_WEBHOOK }} -d "${SLACK_MESSAGE}"
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "backend/ddang/3-ddang-submodule"]
path = backend/ddang/3-ddang-submodule
url = https://github.com/apptie/3-ddang-submodule
branch = main
34 changes: 34 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore
/3DDANG_KEY

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof
1 change: 1 addition & 0 deletions android/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
100 changes: 100 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'kotlin-parcelize'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

android {
namespace 'com.ddangddangddang.android'
compileSdk 33

defaultConfig {
applicationId "com.ddangddangddang.android"
minSdk 28
targetSdk 33

versionCode 3
versionName "2.1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

manifestPlaceholders = [KEY_KAKAO: properties['key.kakao']]
buildConfigField 'String', 'KEY_KAKAO', properties['key.kakao.string']
buildConfigField "String", "PRIVACY_POLICY_URL", properties['url.privacyPolicy']
}

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro',
'glide.pro',
'retrofit2.pro'
}
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro',
'glide.pro',
'retrofit2.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}

buildFeatures {
buildConfig true
dataBinding true
}
}

dependencies {
implementation project(":data")
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

// lifecycle
implementation 'androidx.activity:activity-ktx:1.7.2' // by viewModels()
implementation 'androidx.fragment:fragment-ktx:1.6.0' // by activityViewModels()
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.6.1"

// 리사이클러뷰
implementation 'androidx.recyclerview:recyclerview:1.3.0'

// 이미지 처리
implementation 'com.github.bumptech.glide:glide:4.15.1'

// 테스트
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'

testImplementation 'io.mockk:mockk-android:1.13.5'

testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test'
testImplementation 'androidx.arch.core:core-testing:2.2.0'

androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

// 파이어베이스
implementation platform('com.google.firebase:firebase-bom:32.2.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-crashlytics-ktx'

// 카카오 로그인
implementation 'com.kakao.sdk:v2-user:2.11.1'
}
14 changes: 14 additions & 0 deletions android/app/glide.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep class * extends com.bumptech.glide.module.AppGlideModule {
<init>(...);
}
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
*** rewind();
}

# Uncomment for DexGuard only
#-keepresourcexmlelements manifest/application/meta-data@value=GlideModule
45 changes: 45 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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
-keep interface com.ddangddangddang.data.* { *; }
-keep class com.ddangddangddang.data.model.** { *; }
-keep class com.ddangddangddang.data.remote.** { *; }

-keep interface com.ddangddangddang.android.* { *; }
# Kakao SDK
-keep interface com.kakao.sdk.**.*Api
-keep class com.kakao.sdk.**.model.* { <fields>; }
-keep class * extends com.google.gson.TypeAdapter
# https://github.com/square/okhttp/pull/6792
-dontwarn org.bouncycastle.jsse.**
-dontwarn org.conscrypt.*
-dontwarn org.openjsse.**
# firebase-crashlytics
-keepattributes SourceFile,LineNumberTable # Keep file names and line numbers.
-keep public class * extends java.lang.Exception # Optional: Keep custom exceptions.
# firebase-analytics
-keep public class com.google.firebase.analytics.FirebaseAnalytics {
public *;
}
-keep public class com.google.android.gms.measurement.AppMeasurement {
public *;
}

Loading

0 comments on commit a971358

Please sign in to comment.