Class: Projects::AndroidTargetPlatformDetectorService

Inherits:
BaseService
  • Object
show all
Defined in:
app/services/projects/android_target_platform_detector_service.rb

Overview

Service class to detect if a project is made to run on the Android platform.

This service searches for an AndroidManifest.xml file which all Android app project must have. It returns the symbol :android if the given project is an Android app project.

Ref: developer.android.com/guide/topics/manifest/manifest-intro

Example usage: > AndroidTargetPlatformDetectorService.new(a_project).execute

> nil

> AndroidTargetPlatformDetectorService.new(an_android_project).execute

> :android

Constant Summary collapse

MANIFEST_FILE_SEARCH_QUERY =

<manifest> element is required and must occur once inside AndroidManifest.xml

'<manifest filename:AndroidManifest.xml'

Instance Attribute Summary

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

This class inherits a constructor from BaseService

Instance Method Details

#executeObject


21
22
23
# File 'app/services/projects/android_target_platform_detector_service.rb', line 21

def execute
  detect
end